fix(a11y): use aria-labelledby instead of aria-label on Modal dialog#479
Open
akinshaywai wants to merge 2 commits intothesysdev:mainfrom
Open
fix(a11y): use aria-labelledby instead of aria-label on Modal dialog#479akinshaywai wants to merge 2 commits intothesysdev:mainfrom
akinshaywai wants to merge 2 commits intothesysdev:mainfrom
Conversation
The modal dialog used aria-label={title} which duplicates the visible
<h2> title text. Replaced with aria-labelledby pointing to the <h2>
element via id="openui-modal-title", following the ARIA authoring
practices recommendation to reference visible heading text rather than
duplicating it as a hidden string.
The h2 line with added id attribute exceeded prettier's line length. Split the title content onto a separate line.
auto-merge was automatically disabled
April 28, 2026 20:28
Head branch was pushed to by a user without write access
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The modal
role="dialog"element usedaria-label={title}, which duplicates the text already rendered in the visible<h2>heading. The ARIA Authoring Practices Guide recommends usingaria-labelledbyto reference a visible heading element instead.Changes:
id="openui-modal-title"to the existing<h2>elementaria-label={title}on the dialogdivwitharia-labelledby="openui-modal-title"This ensures screen readers read the actual rendered heading text rather than a separate hidden string that could drift out of sync.
Test plan