{"action":"created","issue":{"url":"https://api.github.com/repos/w3c/aria/issues/85","labels_url":"https://api.github.com/repos/w3c/aria/issues/85/labels{/name}","comments_url":"https://api.github.com/repos/w3c/aria/issues/85/comments","events_url":"https://api.github.com/repos/w3c/aria/issues/85/events","html_url":"https://github.com/w3c/aria/issues/85","id":102081108,"number":85,"title":"Using the form’s role attribute","user":{"login":"yatil","id":58862,"avatar_url":"https://avatars.githubusercontent.com/u/58862?v=3","gravatar_id":"","url":"https://api.github.com/users/yatil","html_url":"https://github.com/yatil","followers_url":"https://api.github.com/users/yatil/followers","following_url":"https://api.github.com/users/yatil/following{/other_user}","gists_url":"https://api.github.com/users/yatil/gists{/gist_id}","starred_url":"https://api.github.com/users/yatil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatil/subscriptions","organizations_url":"https://api.github.com/users/yatil/orgs","repos_url":"https://api.github.com/users/yatil/repos","events_url":"https://api.github.com/users/yatil/events{/privacy}","received_events_url":"https://api.github.com/users/yatil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-08-20T07:38:28Z","updated_at":"2015-10-02T07:38:40Z","closed_at":null,"body":"There has been a [twitter conversation](https://twitter.com/rogerjohansson/status/633986303097442304) that started by an Validator warning:\r\n\r\n```html\r\n<form role=\"search\">\r\n```\r\n\r\n> Warning: Element form does not need a role attribute\r\n\r\nNow I know that it violates the [second rule of ARIA use](http://www.w3.org/TR/aria-in-html/#second-rule-of-aria-use):\r\n\r\n> Do not change native semantics, unless you really have to.\r\n\r\nYet the specifications do not facilitate that and there seems to be no indication that this behavior is wrong, for example:\r\n\r\n* [WAI-ARIA 1.0 says nothing specific about this](http://www.w3.org/TR/wai-aria/roles#search) which makes sense as it is agnostic to HTML, yet mentions that the `form` role is “related” although the “Superclass Role” is `landmark` and not `form`.\r\n\r\n* [WAI-ARIA 1.1 (Draft)](http://www.w3.org/TR/wai-aria-1.1/#form) seems to steer people in the direction of using `search` on forms by noting: <q>For search facilities, authors SHOULD use the search role and not the generic form role.</q>\r\n\r\n* [HTML5 says forms can have “any roles”](http://www.w3.org/TR/html/forms.html#the-form-element)\r\n\r\n* [WCAG technique ARIA11](http://www.w3.org/TR/WCAG20-TECHS/ARIA11.html#ARIA11-ex4) has `<form role=\"search\">` as an example.\r\n\r\nNow, a validator warning is not an error, and developers can chose to ignore it. On the other hand having `<form role=\"search\">` seems to feel natural for many people (including me when I first heard about the search role a few years back).\r\n\r\nWhat one could do:\r\n\r\n* Make `search` a subclass of `form` (if even possible) and get rid of the validator warning. (That may have implications in the current implementations of AT.\r\n* Outlaw any roles on form (but `presentation`, I suppose) for HTML5.1 and have the validator display an error.\r\n* (… other ideas welcome …)\r\n\r\nAt least the WCAG technique should be changed to reflect best practices (see w3c/wcag#113)). There is no indication (but it hasn’t been sufficiently tested) that `<form role=\"search\">` breaks AT support, but it feels like this is a glitch in the ARIA matrix that should be clarified.\r\n\r\nRelated: See @aardrian’s blog post on this issue: [Where to Put Your Search Role](http://adrianroselli.com/2015/08/where-to-put-your-search-role.html)\r\n\r\n(Thanks to the input @rogerjohansson, @aardrian, @LjWatson, @stevefaulkner, @cptvitamin and others.)"},"comment":{"url":"https://api.github.com/repos/w3c/aria/issues/comments/144944690","html_url":"https://github.com/w3c/aria/issues/85#issuecomment-144944690","issue_url":"https://api.github.com/repos/w3c/aria/issues/85","id":144944690,"user":{"login":"yatil","id":58862,"avatar_url":"https://avatars.githubusercontent.com/u/58862?v=3","gravatar_id":"","url":"https://api.github.com/users/yatil","html_url":"https://github.com/yatil","followers_url":"https://api.github.com/users/yatil/followers","following_url":"https://api.github.com/users/yatil/following{/other_user}","gists_url":"https://api.github.com/users/yatil/gists{/gist_id}","starred_url":"https://api.github.com/users/yatil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yatil/subscriptions","organizations_url":"https://api.github.com/users/yatil/orgs","repos_url":"https://api.github.com/users/yatil/repos","events_url":"https://api.github.com/users/yatil/events{/privacy}","received_events_url":"https://api.github.com/users/yatil/received_events","type":"User","site_admin":false},"created_at":"2015-10-02T07:38:40Z","updated_at":"2015-10-02T07:38:40Z","body":"Hi @Volker-E – Well, that is exactly what we want to find out here. At the moment specs seem to have no clear indication if `role=\"search\"` can be used on a `form` or not. Currently I, personal, would like to avoid the questions by using `<form><div role=\"search\">` as it provides the best of both worlds and doesn’t throw an error in the validator. I agree that it is an additional superfluous element and probably is illogical, but we won’t know until this issue is resolved."}}