-
Notifications
You must be signed in to change notification settings - Fork 120
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
ARIA 1.2: Explicit guidance needed for non-pertinent errormessage elements #587
Comments
Matt during meeting said he didn't like the idea of aria-hidden being set to true because that is not the purpose of aria-hidden="true". |
"Authors MUST remove the error message when it is not pertinent, either by removing the aria-errormessage attribute or its value, or by ensuring the referenced element is not rendered." |
…587) * When aria-errormessage is not pertinent, authors MUST either ensure the content is not rendered or remove the aria-errormessage attribute or its value. * User agents MUST NOT expose an element as a pertinent error message when the referencing element lacks aria-invalid set to true.
The changes here are normative, and the "1.1" label/target was set so that we'd include these changes if the Working Group consensus was to exit and re-enter CR. The other issues which would make exiting and re-entering CR desirable proved to be non-issues. The subsequent agreement of the Working Group was to postpone this particular issue to 1.2. Updating the issue accordingly. |
…ts (#587) (#589) * ARIA: Add explicit guidance for non-pertinent errormessage elements (#587) * When aria-errormessage is not pertinent, authors MUST either ensure the content is not rendered or remove the aria-errormessage attribute or its value. * User agents MUST NOT expose an element as a pertinent error message when the referencing element lacks aria-invalid set to true. * Proposed editorial revisions to proposal in pull #589 for issue #587. (#590) * Treat any non-false value for aria-invalid as "true" for aria-errormessage Otherwise, it is not clear what user agents should do with aria-invalid set to spelling, grammar, or any future allowed enum value.
Thinking about the APG requirement for this for w3c/aria-practices#564 and not sure why the authoring statement is a MUST instead of a SHOULD. We have the requirement:
So, if aria-invalid is not true, then the error message relationship is not exposed, right? Then, what is the practical implication of the author including aria-errormessage when aria-invalid is not true? We have this requirement:
Obviously, not rendering an error message that is not pertanent, regardless of whether or not there is a relationship, is very important. A common scenario is:
|
I began implementing support for
aria-errormessage
in WebKitGtk, but was unsure how user agents should handlearia-errormessage
referencing a valid, non-hidden element when that error message has not explicitly been marked as pertinent by the author. In particular:The ARIA spec states, "Authors MUST use
aria-invalid
in conjunction witharia-errormessage
. Initially, the object is in a valid state and either hasaria-invalid
set tofalse
or noaria-invalid
attribute, and the element referenced byaria-errormessage
is not applicable."Question: What are user agents expected to do when
aria-invalid
is missing orfalse
, butaria-errormessage
references a valid, non-hidden element? Not expose the referenced element at all? Something else?Proposal: We should add a normative statement to the ARIA spec explaining the expectations of user agents. I would suggest something like, "User agents MUST NOT expose an element as a pertinent error message when the referencing element lacks
aria-invalid="true"
.The ARIA spec states, "When
aria-errormessage
is pertinent, authors MUST ensure the content is not hidden and is included in a container that exposes the content to the user as it is expected that the assistive technology user will navigate to the content in order to access it."Question: When
aria-errormessage
is NOT pertinent, there is no statement regarding authors taking steps to cause the error message to be pruned from the accessibility tree. Is there any possibility the author will "hide" it visually in a way that it is still in the accessibility tree? If so, is it up to user agents to figure that condition out from aria-invalid's value? Hopefully not, but if that is the case, see item 1 above.Proposal: We should add a normative statement to the ARIA spec instructing authors to take steps to cause the error message to be pruned from the accessibility tree. Something like, "Authors MUST remove the error message when it is not pertinent, either by removing the element's id from
aria-errormessage
or by ensuring the referenced element is not rendered or has anaria-hidden
value oftrue
.The text was updated successfully, but these errors were encountered: