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

<pf-switch>: Missing required aria attribute #2697

Closed
kylebuch8 opened this issue Feb 26, 2024 · 4 comments
Closed

<pf-switch>: Missing required aria attribute #2697

kylebuch8 opened this issue Feb 26, 2024 · 4 comments
Assignees
Labels
accessibility Improve accessibility bug priority: low Severity level: 3

Comments

@kylebuch8
Copy link
Contributor

Description of the issue

The pf-switch is missing the required aria-checked attribute.
https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/checkbox_role

Impacted component(s)

  • pf-switch

Steps to reproduce

Expected behavior

There should be an aria-checked attribute present indicating the state of the switch since the switch has a role of checkbox.

Screenshots

image

@kylebuch8 kylebuch8 added priority: low Severity level: 3 bug accessibility Improve accessibility labels Feb 26, 2024
@markcaron markcaron assigned markcaron and nikkimk and unassigned markcaron Feb 26, 2024
@nikkimk
Copy link
Collaborator

nikkimk commented Feb 26, 2024

@bennypowers element internals aren't showing up in the accessibility tree for pf-switch and pf-jump-links

@kylebuch8
Copy link
Contributor Author

kylebuch8 commented Feb 28, 2024

Should the role of pf-switch be role="switch"? (Thanks @bexter89)

Would it also need the title attribute?

@bennypowers bennypowers changed the title pf-switch: Missing required aria attribute <pf-switch>: Missing required aria attribute Mar 4, 2024
@bennypowers
Copy link
Member

bennypowers commented Mar 4, 2024

@nikkimk either it's our fault and internals controller is broken, or it's the browser, or it's a polyfill bug. we should first see if there's a new version of the polyfill. then we should try it on various browsers with the polyfill NOT included and see if that helps.

We should also try this with internals controller, since switch was written before the controller was.

worst case is that browsers aren't exposing this info to AT, in which case there's not much to be done about it other than throw up our hands and sprout attrs.

@bennypowers
Copy link
Member

should be closed by #2702

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility Improve accessibility bug priority: low Severity level: 3
Projects
None yet
Development

When branches are created from issues, their pull requests are automatically linked.

4 participants