WordPress XHTML syntax error search form
When the search form is displayed with the widget of the word press, a grammatical error is pointed out with XHTML. It is displayed that role="search" of form tag doesn't apply to the grammar.
Role attribute in XHTML
The search form can be made from the setting of the widget of the sidebar of WordPress. If this is done, it becomes a grammatical error by XTHML though this is very convenient to retrieve it in the blog. It understands at once when checking it by (http://validator.w3.org/) that checks the grammar.
This is because the role attribute is attached to form tag. This role attribute is removed because it is especially unnecessary. WordPress3.02-ja and WordPress3.03-ja have adhered. When the upgrade is done, it is necessary to correct it again.
What is the role attribute?
The role attribute is an attribute in which the role is given to the element. The attribute value includes "banner" "contentinfo" "definition" "main" "navigation" "note" "search" "secondary" "seealso" etc."search" shows the retrieval section in the document.
It is a way though took with WordPress ahead of time though the role attribute has gone out of W3C as a draft as enhancing XHTML. It deletes it because it is especially unnecessary now.
How to find file and position in which role="search" is recorded
The inside is not understood. where role="search" that exists in the search form isI looked for by using TextSS. TextSS is software that excels and is free that can change the batch by searching for the content of two or more text file in the personal computer.
The corresponding section is in about the 160th line of/wp-includes/general-template.php for WordPress3.02-ja and WordPress3.03-ja.
$form = '<form role="search" method="get" id="searchform" action="' . home_url( '/' ) . '" >
role="search" is erased because it becomes it. The error disappeared by this. I want to always check and to lose a grammatical error.
Please check the XHTML(HTML) grammar
When the homepage and the blog are made, I want to check this grammar. It is possible to always take care about the grammar by always checking it.
The page is graded, and several points are displayed by 100 point full marks on this Another HTML-lint gateway site. It is 95 points or more maybe. There is no what the display becomes strange if the point of this can be taken.