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

Should the ARIA WG standardize heuristic-based ignoring of ARIA and related features? And if so, how? #2422

Open
cookiecrook opened this issue Jan 30, 2025 · 9 comments
Assignees

Comments

@cookiecrook
Copy link
Contributor

Should the ARIA WG standardize heuristic-based ignoring of ARIA and related features? And if so, how?

One pre-existing example is how engines now ignore aria-hidden in certain scenarios where it's clearly an author mistake.

To prevent authors erroneously hiding entire window-rendered documents only to those using assistive technology, user agents MUST NOT expose the hidden state to assistive technologies if it is specified on the root element or the host language element that represents the contents of the primary document in view.

Another example I've become aware of recently is misuse of the aria-modal attribute. Some Amazon pages, until recently, included a modal dialog that was erroneously persistent. This prevented a lot of VO-based navigation from working. Thankfully Amazon fixed some or all of these instances, but it was impactful, that Apple plans to ship a WebKit change preventing web authors from being able to cause quite such an egregious disruption again.

I'm curious if others in the WG would like to discuss tracking some or all of these heuristic engine changes in or near the spec, and if so, in what format.

@cookiecrook
Copy link
Contributor Author

Perhaps an automatically updated list (ReSpec classname hook?) outside the spec, so we could combine exceptions from multiple specs into a WPT-testable list?

@spectranaut
Copy link
Contributor

Discussed in yesterday's ARIA meeting: https://www.w3.org/2025/02/27-aria-minutes#6e5d

@cookiecrook cookiecrook self-assigned this Mar 2, 2025
@cookiecrook
Copy link
Contributor Author

I took on an action to start an ARIA wiki page....

  1. list the existing heuristics already documented (with RFC-2119 reqs if relevant) in the specs
  2. start the list of other heuristics not mandated in the specs... (data table heuristics may be a good one))
  3. maybe more… but there is no expectation this list will even be complete

@cookiecrook
Copy link
Contributor Author

@cookiecrook cookiecrook removed the Agenda label Mar 4, 2025
@cookiecrook
Copy link
Contributor Author

@cookiecrook
Copy link
Contributor Author

cookiecrook commented Mar 7, 2025

Here's another sticky one that might not get standardized.

@pkra
Copy link
Member

pkra commented Mar 7, 2025

@cookiecrook your last comment links to this issue. Did you mean to link somewhere else?

@patrickhlauke
Copy link
Member

not sure if relevant here (it seems adjacent, but perhaps more related to accessible name computation?), but Chrome's heuristic for "guessing" that a text alternative is not sufficient/good https://issues.chromium.org/issues/389897606 (@aleventhal took part in that discussion, but it seems the resolution was to still just naively look at length)

@rahimabdi
Copy link
Contributor

There are some heuristics for aria-selected that may also fit here:

The option, tab, and treeitem roles permit user agents to provide an implicit value for aria-selected when specified conditions are met. User agents MUST NOT provide an implicit value for aria-selected in any other circumstance.

For role=”option”:

If a user agent provides an implicit aria-selected value for an option, the value SHOULD be true if the option has DOM focus or the listbox has DOM focus and the option is referenced by aria-activedescendant.
Otherwise, if a user agent provides an implicit aria-selected value for an option, the value SHOULD be false.

For role=”tab”:

In certain conditions, a user agent MAY provide an implicit value for aria-selected for each tab in a tablist, and if it does, the user agent MUST ensure the following conditions are met before providing an implicit value:
The value of aria-multiselectable on the tablist is false or undefined.
None of the tab elements in the tablist have an explicitly declared value for aria-selected or aria-expanded.

For role=”treeitem”:

If a user agent provides an implicit aria-selected value for a treeitem, the value SHOULD be true if the treeitem has DOM focus or the tree has DOM focus and the treeitem is referenced by aria-activedescendant.
Otherwise, if a user agent provides an implicit aria-selected value for a treeitem, the value SHOULD be false.

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

No branches or pull requests

5 participants