Skip to content
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

Closed
joanmarie opened this issue Jun 14, 2017 · 4 comments
Closed
Labels

Comments

@joanmarie
Copy link
Contributor

I began implementing support for aria-errormessage in WebKitGtk, but was unsure how user agents should handle aria-errormessage referencing a valid, non-hidden element when that error message has not explicitly been marked as pertinent by the author. In particular:

  1. The ARIA spec states, "Authors MUST use aria-invalid in conjunction with aria-errormessage. Initially, the object is in a valid state and either has aria-invalid set to false or no aria-invalid attribute, and the element referenced by aria-errormessage is not applicable."

    Question: What are user agents expected to do when aria-invalid is missing or false, but aria-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".

  2. 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 an aria-hidden value of true.

@joanmarie
Copy link
Contributor Author

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".

@joanmarie
Copy link
Contributor Author

"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."

joanmarie added a commit that referenced this issue Jun 15, 2017
…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.
@joanmarie
Copy link
Contributor Author

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.

joanmarie added a commit that referenced this issue Dec 6, 2017
…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.
@mcking65 mcking65 changed the title ARIA 1.1: Explicit guidance needed for non-pertinent errormessage elements ARIA 1.2: Explicit guidance needed for non-pertinent errormessage elements Dec 7, 2017
@mcking65
Copy link
Contributor

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:

User agents MUST NOT expose an element as a pertinent error message when the referencing element lacks aria-invalid set to true.

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:

When aria-errormessage is not pertinent, authors MUST either ensure the content is not rendered or remove the aria-errormessage attribute or its value.

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:

  • author renders div with descriptive info and it is referenced by aria-describedby.
  • User makes invalid input.
  • The div that had description now has error message and is referenced by aria-errormessage.
  1. Is there any practical implication to leaving the aria-errormessage relationship in place regardless of state of invalid?
  2. Should the author make sure that errormessage and describedby do not point to the same thing at the same time?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants