-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect ARIA Landmark Example (role=search) #113
Comments
The following text should probably be edited to remove "form field" (which I think mean to say "form element," though it implies an ): The search role typically goes on the form field or a div surrounding the search form. |
Suggested replacement content for the technique... The following examples show a search form with a "search" landmark. The "search" role should be put on a div containing the form, or a div just inside the form, but not on the form element itself (because overriding the native semantics of existing HTML elements is not recommended).
If it's permissable to link to working draft notes, then I'd suggest including Notes on Using ARIA in HTML as one of the resources linked from this technique. |
Does this count as overriding native semantics? Isn't this just setting a landmark for a specific type of form? Does this cause any actual problems, other than a warning in the validator? (Warning is "Element form does not need a role attribute.") |
Note that this might be an ARIA and coordination issue, probably PFWG needs reiterate on this. I have talked to @michael-n-cooper and he proposed to file a bug against ARIA which I will do tomorrow morning (unfortunately no time to do it today). |
It overrides the native semantics of the form element, yes. What real-world impact this has on current ATs is unknown, but my hunch is that it's minimal. We can't know what impact it might have as more ATs support ARIA though (obviously). Arguably a WCAG technique shouldn't recommend a practice that is generally problematic though. |
Related info:
|
So, if PF/APA/ARIA feels that this is not a best practice we should modify the example. I'm not really seeing in the docs where authors are guided against putting role=search on a form element, and for that matter, I'm neither hearing anyone citing actual problems with AT nor am I convinced that a role of search is overriding native semantics (it seems that it might be seen as tightening the semantic scope of the form, but not overriding?). All that said, the easiest path is to change the example to a form that we all agree is ok. Example 4 intro: Example 4 (added the div, moved the role="search" to the div)
search
...
We will wait for the ARIA in HTML document to be published and then add a link at that time. |
I'd say this proposal should be run past PF. WCAG is being asked to
issue guidance on an issue to which it does not know the correct answer,
and we don't want to come out with a different answer than PF would if
asked the same question (which they may be). Even if the proposal is not
wrong, it may not be right either, and I'd rather come up with the
closest to right answer possible.
|
Surveyed August 25, left open pending discussion |
NOTE: The right way to use ARIA's search role when inside a form is still in discussion, anyway I changed in a way that both works AND gets validated by W3C. More Info on: w3c/wcag#113
I looked at the HTML 5 specification. There is nothing that states that a role of "search" cannot be applied to :http://www.w3.org/TR/html5/dom.html#wai-aria So, the question is why is the validator flagging it? |
Is this because it is excluded in HTML 5.1? |
My Gmail ate part of your message, but I assume you are applying it to a I ran into this a few months ago, wrote what I found: People smarter than I weighed in on it. On Tue, Dec 1, 2015 at 12:31 PM, Richard Schwerdtfeger <
|
Hi @richschwer, see this issue on ARIA for some overview on affected specs: w3c/aria#85 |
I see. For there to be a validator warning there would need to be an indication in the HTML5 specification that you could not put a role of "search" on a form. It is entirely conceivable to have a form be used to perform a search and in fact it may be more accurate. ARIA allows the host language to restrict the application of some roles to HTML. There is no reason for the HTML validator to spit out a warning. |
I should add that ARIA already provides a Form role. |
I like Leonies example |
Draft response: Currently this is allowed in the spec, and we will let it be unless we find a use case that determines it is an error. We may log a bug against the ARIA in HTML doc (5.1) as it only allows global ARIA attributes on form elements, and not roles. We will leave the example as it is - the validator is at fault here, and this is a work in progress then take up this issue with the ARIA working group. |
Modified draft response: |
@awkawk it is not the validator (at fault) it is the spec http://www.w3.org/TR/html-aria/ which defines conformance requirements for use of ARIA in HTML,@jnurthen has opened an issue on the spec, to which i have commented w3c/html-aria#18 (comment) feel free to continue discussion on bug. |
I should note that the spec. Steve refers to is for HTML 5.1 as this bug does not exist in the HTML5 spec. The validator has made a change based on a spec. that has not yet reached recommendation. Isn't it a bit early to be modifying the validator? ... just saying. This is an easy fix for Steve. Steve, what is the time line for HTML 5.1? |
resolved w3c/html-aria#18 |
Proposed response: This issue is resolved with an update to the spec by @stevefaulkner and a bug filed on the validator. No changes will be made to the WCAG documents. |
+1 |
1 similar comment
+1 |
Proposed response accepted by WCAG group on Dec 18 (https://www.w3.org/WAI/GL/wiki/Decisions) |
@awkawk Hi Andrew, this discussion has revolved around whether a role=search should be applied or not on the FORM element. |
@OlivierNourry The ARIA Authoring Practices Guide has the following information: “A search landmark contains a collection of items and objects that, as a whole, combine to create search functionality.” One form element with a |
@OlivierNourry I made the change in the source docs to reflect @aardrian's suggestion: 5ac01d9?diff=split |
Agreed, and it could also be argued that an input field is not a landmark, properly speaking.
The issue here is that the ARIA11 technique says you can use role=search on a form *field*, which is wrong as per what we are saying. IMHO this example should be fixed in this regard, don’t you think?
… Le 25 mai 2017 à 15:09, Eric Eggert ***@***.***> a écrit :
@OlivierNourry <https://github.com/oliviernourry> The ARIA Authoring Practices Guide <https://cdn.rawgit.com/w3c/aria-practices/master/aria-practices.html#aria_lh_search> has the following information:
“A search landmark contains a collection of items and objects that, as a whole, combine to create search functionality.”
One form element with a role="search" is probably not really a “collection” (unless you count the shadow DOM…).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#113 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AC0Owbf6EuXK8l_ErTxcyGdnOXWND13xks5r9X19gaJpZM4FubGY>.
|
@awkawk awesome, thanks! |
@OlivierNourry Totally agreed :-) Thanks for pointing it out! |
My pleasure! Actually I had validated putting a role=search on an input field, and later on, the validator and the screen reader proved me wrong. So I felt it had to be fixed at source to avoid the same mistake to others. Glad if it helps!
… Le 25 mai 2017 à 15:26, Eric Eggert ***@***.***> a écrit :
@OlivierNourry <https://github.com/oliviernourry> Totally agreed :-) Thanks for pointing it out!
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#113 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AC0OwdSJIZy2Ln25wyf9dObeMj06lCQiks5r9YF1gaJpZM4FubGY>.
|
On this page: http://www.w3.org/TR/WCAG20-TECHS/ARIA11.html#ARIA11-ex4
Example 4 shows a role="search" on a form:
[form role="search"]
Doing this will cause the validator to throw a warning. I also understand (thanks to chats on the Gitter channel) that it is not good to apply this role directly to the form as it will override native semantics. It should be applied to a container element instead.
The text was updated successfully, but these errors were encountered: