RadioControl: Add role="radiogroup" to fieldset#76745
Conversation
1281b70 to
6c5578e
Compare
|
Size Change: +4 B (0%) Total Size: 7.66 MB
ℹ️ View Unchanged
|
|
Flaky tests detected in 6c5578e. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23368608671
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
* RadioControl: Add role="radiogroup" to fieldset * Add changelog Co-authored-by: mirka <[email protected]> Co-authored-by: juanfra <[email protected]>
* RadioControl: Add role="radiogroup" to fieldset * Add changelog Co-authored-by: mirka <[email protected]> Co-authored-by: juanfra <[email protected]>
What?
Add
role="radiogroup"to theRadioControlfieldset element.Why?
RadioControlrenders a<fieldset>that contains radio inputs, but the implicit role of<fieldset>isgroup. The WAI-ARIA Radio Group Pattern specifies that a container of radio inputs should userole="radiogroup", which allows assistive technology to convey that the options are mutually exclusive.How?
Add
role="radiogroup"to the<fieldset>inpackages/components/src/radio-control/index.tsx. Update existing unit tests to query by theradiogrouprole instead ofgroup.Testing Instructions
Check the rendered HTML in Storybook.
Use of AI Tools
Authored with Cursor (Claude).