Skip to content

FIX give each multiselect checkbox its own accessible name - #2432

Merged
Roman Lutz (romanlutz) merged 5 commits into
microsoft:mainfrom
tejas0077:fix/multiselect-checkbox-accessible-names
Aug 21, 2026
Merged

FIX give each multiselect checkbox its own accessible name#2432
Roman Lutz (romanlutz) merged 5 commits into
microsoft:mainfrom
tejas0077:fix/multiselect-checkbox-accessible-names

Conversation

@tejas0077

Copy link
Copy Markdown
Contributor

Fixes #2419

Each checkbox in a multiselect Field was receiving aria-labelledby pointing to the surrounding Field label (e.g. "tags"), overriding the individual visible option label. Screen readers announced every checkbox as "tags, checkbox" instead of "default, checkbox", "core, checkbox" etc.

Fix: added aria-label={choice} to each Checkbox so the individual option label is used as the accessible name. Also moved the group label to a visually-hidden span referenced by aria-labelledby on the group div, preserving "tags" as the group label for screen readers.

Added srOnly utility style to AdditionalInitializers.styles.ts for the visually-hidden span.

Verified the fix by inspecting the rendered accessibility tree. The existing test suite covers checkbox rendering and interaction. No documentation changes needed for this frontend accessibility fix.

Each checkbox in a multiselect Field was receiving aria-labelledby
pointing to the surrounding Field label (e.g. 'tags'), overriding the
individual visible option label. Screen readers announced every checkbox
as 'tags, checkbox' instead of 'default, checkbox', 'core, checkbox' etc.

Fix: add aria-label={choice} to each Checkbox so the individual option
label is used as the accessible name. Also move the group label to a
visually-hidden span referenced by aria-labelledby on the group div,
preserving 'tags' as the group label for screen readers.

Added srOnly utility style to AdditionalInitializers.styles.ts.

Fixes microsoft#2419
@hannahwestra25 hannahwestra25 self-assigned this Aug 20, 2026
Comment thread frontend/src/components/Initializers/InitializerParametersDialog.tsx Outdated
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@romanlutz
Roman Lutz (romanlutz) added this pull request to the merge queue Aug 21, 2026
Merged via the queue into microsoft:main with commit f10086d Aug 21, 2026
47 checks passed
@tejas0077

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback! Updated the fix to use label={{ children: choice, id: choiceLabelId }} with aria-labelledby={choiceLabelId} as suggested.

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.

Initializer multiselect checkboxes expose identical accessible names

4 participants