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-checked for Checkboxes #44544

Closed
ata1704 opened this issue Nov 25, 2024 · 1 comment
Closed

aria-checked for Checkboxes #44544

ata1704 opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels

Comments

@ata1704
Copy link

ata1704 commented Nov 25, 2024

Summary

The Checkbox should have the aria-checked attribute showing the boolean state that is provided for the Checkbox. I cannot see any reason why this is not implemented by default.

Examples

No response

Motivation

No response

Search keywords: aria-checked checkbox

@ata1704 ata1704 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 25, 2024
@aarongarciah aarongarciah self-assigned this Nov 25, 2024
@aarongarciah
Copy link
Member

Hi @ata1704, thanks for getting involved. The Checkbox component uses an <input type="checkbox"> element under the hood, so there's no need to use aria-checked since it already has built in semantics. We try to follow the first rule of ARIA whenever possible:

If you can use a native HTML element [HTML51] or attribute with the semantics and behavior you require already built in, instead of re-purposing an element and adding an ARIA role, state or property to make it accessible, then do so.

(source: https://www.w3.org/TR/using-aria/#firstrule)

Feel free to reopen this issue if you think it requires further discussion.

@aarongarciah aarongarciah closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2024
@aarongarciah aarongarciah removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Nov 26, 2024
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