Skip to content

Fix: ToggleButton accessibility attributes#8068

Merged
melloware merged 2 commits intoprimefaces:masterfrom
tneeraja95:togglebutton-aria
Jun 4, 2025
Merged

Fix: ToggleButton accessibility attributes#8068
melloware merged 2 commits intoprimefaces:masterfrom
tneeraja95:togglebutton-aria

Conversation

@tneeraja95
Copy link
Contributor

@tneeraja95 tneeraja95 commented Jun 4, 2025

Fix #8021

Fixes -

  1. Added aria-label and aria-labelledby from props to the ToggleButton input for accessible naming.
  2. Removed role and aria-pressed from the input element, as they are not applicable to type="checkbox" and can create conflicting semantics.

@melloware
Copy link
Member

Here is what PrimeVue does: https://primevue.org/togglebutton/#accessibility Can you confirm we do the same with this PR?

@tneeraja95
Copy link
Contributor Author

tneeraja95 commented Jun 4, 2025

Updated the PR. Using aria-label and aria-labelledby from props.

@melloware melloware merged commit 9490bc8 into primefaces:master Jun 4, 2025
3 checks passed
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

Successfully merging this pull request may close these issues.

ToggleButton - Accessibility bug

2 participants