Title: w3c Error search-form
Last modified: August 30, 2016

---

# w3c Error search-form

 *  Resolved [Felln](https://wordpress.org/support/users/felln/)
 * (@felln)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/w3c-error-4/)
 * The w3c validator under [https://validator.w3.org](https://validator.w3.org) 
   told me an error:
    Error: Bad value search for attribute role on element form.
 * It’s here:
    <form role=”search” method=”get” class=”search-form” action=”[http://XXX”&gt](http://XXX”&gt);
 * It’s on your demo site too.

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Michael](https://wordpress.org/support/users/mh-themes/)
 * (@mh-themes)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865508)
 * Hi Felln,
 * that error isn’t related to the theme but to WordPress itself because the search
   form is generated by WordPress and the theme doesn’t affect that. But you can
   ignore this anyway because this doesn’t have any negative effects on your website…
 * Actually you don’t have to take the W3C validation too serious. If you think 
   that it’s very important, then test the W3C validation of Google.com and you’ll
   see what happens. 😉
 *  [ifingers](https://wordpress.org/support/users/ifingers/)
 * (@ifingers)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865834)
 * I think validating your HTML should always be recommended. Most browsers, and
   Google can cope with badly formed HTML but some do not. Valid HTML really helps
   with accessibility.
 * [https://make.wordpress.org/accessibility/handbook/testing/how-to-test-for-accessibility/](https://make.wordpress.org/accessibility/handbook/testing/how-to-test-for-accessibility/)
 * Google may not stick to their own guidelines… but for the first time, they do
   now stipulate “Valid HTML”. So it may be an indication that they are using this
   as one of their ranking factors: [https://support.google.com/webmasters/answer/35769?hl=en](https://support.google.com/webmasters/answer/35769?hl=en)
 * Validation is also a good way of finding non-closed links etc in the content.
   A good way to spot any HTML ‘typos’.
 *  [ifingers](https://wordpress.org/support/users/ifingers/)
 * (@ifingers)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865835)
 * With regards to Felin’s validation error. It looks like this is due to the validator
   being incorrect at this point of time: [http://adrianroselli.com/2015/08/where-to-put-your-search-role.html](http://adrianroselli.com/2015/08/where-to-put-your-search-role.html)
   
   So, probably safe to ignore. But I still say it’s always good to validate! 😉
 *  [Michael](https://wordpress.org/support/users/mh-themes/)
 * (@mh-themes)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865836)
 * [@ifingers](https://wordpress.org/support/users/ifingers/): HTML validation in
   general definitely is a good thing and our themes also are W3C valid as we usually
   test this ourselves.
 * But often people take this too serious and then contact theme developers just
   because something on their site isn’t W3C valid and then get crazy about this
   and that’s the scenario which isn’t worth it as a few minor W3C notices isn’t
   an issue, especially as it’s sometimes even necessary to do things that aren’t
   W3C valid but make sense in other ways.
 * > With regards to Felin’s validation error. It looks like this is due to the 
   > validator being incorrect at this point of time. So, probably safe to ignore.
 * Yes, that’s why we mentioned it. There is no need to worry about things that 
   aren’t to worry about. In general W3C notices like this are related to plugins,
   3rd party scripts or in this case WordPress itself and there is a reason why 
   it’s coded like that. 🙂
 *  [ifingers](https://wordpress.org/support/users/ifingers/)
 * (@ifingers)
 * [10 years, 3 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865838)
 * [@mh](https://wordpress.org/support/users/mh/) Themes: Happy to hear you validate
   your themes. A lot of people don’t. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘w3c Error search-form’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/mh-magazine-lite/2.10.0/screenshot.
   png)
 * MH Magazine lite
 * [Support Threads](https://wordpress.org/support/theme/mh-magazine-lite/)
 * [Active Topics](https://wordpress.org/support/theme/mh-magazine-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/mh-magazine-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/mh-magazine-lite/reviews/)

 * 5 replies
 * 3 participants
 * Last reply from: [ifingers](https://wordpress.org/support/users/ifingers/)
 * Last activity: [10 years, 3 months ago](https://wordpress.org/support/topic/w3c-error-4/#post-6865838)
 * Status: resolved