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

Correction: update aria-checked allowances #372

Merged
merged 12 commits into from
Apr 16, 2022

Conversation

scottaohara
Copy link
Member

@scottaohara scottaohara commented Nov 10, 2021

closes #361

Per the peculiar nature of aria-checked, where it allows for three different states on checkboxes (false, true, mixed), but native HTML only allows for true/false, and then has a separate IDL attribute to handle 'mixed', per ARIA's normative rules about host language attributes having higher importance, authors really must not use the aria-checked attribute on native HTML elements that allow it. Particularly input type=checkbox which, if following the requirements of ARIA, as the checked/unchecked MUST always win out, and thus aria-checked MUST always be ignored, even if set to aria-checked=mixed.

These rule update are part of what will resolve the ARIA issue I opened - w3c/aria#1622


Need at least two checkers to accept this change before we can merge.


Preview | Diff


Preview | Diff

@scottaohara scottaohara added the needs implementation commitment Cannot merge into spec until implementations in conformance checkers has been confirmed. label Nov 21, 2021
@dylanb
Copy link

dylanb commented Nov 22, 2021

This change will make it extremely difficult for implementors to implement checkboxes that are styled AND are accessible. Currently most component libraries that implement accessible styled checkboxes use a real checkbox elements for the focus but overlay a visibly styled element of some sort.

I think that this is a change that takes the web platform in the wrong direction.

@JAWS-test
Copy link

Currently most component libraries that implement accessible styled checkboxes use a real checkbox elements for the focus but overlay a visibly styled element of some sort.

That is true

This change will make it extremely difficult for implementors to implement checkboxes that are styled AND are accessible

This is not true as the frameworks do not require ARIA. There is the invisible HTML checkbox (without ARIA) and the visible checkbox (which is marked with aria-hidden=true at most, depending on the implementation)

@scottaohara
Copy link
Member Author

This update is being made to better reflect reality, and to inform authors that what they are doing now is not consistently accessible. Using aria-checked on native checkboxes and radio buttons is not respected in Firefox and Safari, which includes the aria-checked=mixed state. These browsers are correctly following the ARIA spec, as it has been written since version 1.0. Native attributes win out over aria-* equivalents.

Authors using aria-checked=mixed on a native checkbox are presently only exposing this in Chromium browsers, due to their incorrect implementation of ARIA.

Authors should be using the indeterminate IDL attribute to set their checkboxes to the mixed state - which per standard visually hidden checkbox techniques, would work similarly to what authors are doing with their [aria-checked=mixed] + span selectors now.

Further discussion on whether aria-checked needs to be a special case (because it actually is compared to other aria-* attributes, since it combines the checkboxes native checked and indeterminate attributes into one aria-* attribute) can occur in w3c/aria#1622.

@scottaohara scottaohara changed the title update aria-checked allowances Correction: update aria-checked allowances Jan 30, 2022
@scottaohara scottaohara added the needs changelog entry once 2 implementations land, we can merge and note it in our changelog. label Apr 4, 2022
@scottaohara
Copy link
Member Author

verified these rules are included in the IBM Equal Access preview rules. This now meets the 2 implementations needed to be merged into the spec.

@scottaohara scottaohara added Meets 2 implementations req Indicates that a spec change has met the necessary 2 implementations needed to merge. and removed needs implementation commitment Cannot merge into spec until implementations in conformance checkers has been confirmed. needs changelog entry once 2 implementations land, we can merge and note it in our changelog. labels Apr 16, 2022
@scottaohara scottaohara merged commit c6d14a9 into gh-pages Apr 16, 2022
@scottaohara scottaohara deleted the issue-361-aria-checked branch April 16, 2022 15:21
scottaohara added a commit that referenced this pull request May 19, 2022
directly reference the following PRs in the changelog, and prepend each entry with the appropriate 'label'

related to #419

- #352
- #367 (and follow on [commit](887c772))
- #360
- #353
- #372
- #402
- #404
- #403
- #396
- #391
- #369
- #381
@siusin siusin mentioned this pull request Aug 16, 2022
pkra pushed a commit to w3c/aria that referenced this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Meets 2 implementations req Indicates that a spec change has met the necessary 2 implementations needed to merge.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update allowances for aria-checked on inputs
4 participants