fix(FieldLabel): set the label of the labelTooltip info icon - #6414
Open
GuillaumeMMM wants to merge 1 commit into
Open
GuillaumeMMM wants to merge 1 commit into
GuillaumeMMM wants to merge 1 commit into
Conversation
GuillaumeMMM
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 21, 2026 08:03
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
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.
User impact
Users of assistive technologies such as screen readers cannot get the information of the
FieldLabel'slabelTooltip. This PR adds thelabelTooltipto the accessible name of the field's label.Problem and solution fit
In this code from
FieldLabel.tsx, the info icon component is called without alabelprop. Therefore the icon'sspancontainer and itssvgbear the attributearia-hidden="true".The
Tooltipcomponents links thecontentprop to its child with thearia-describedbyattribute.Since the icon has no accessible name, the
aria-describedbyis never appended to the accessible name, and thus never read.The solution I suggest in this PR is to simply add the
labelTooltipas thelabelof the icon, thus automatically removing thearia-hidden="true"of the icon's container, and adding to it anaria-labelwith the value of the tooltip's content.On a side note, with this solution the
aria-describedbystill has no effect because thesvgis still missing an accessible name. Another solution could be to add the reference of the tooltip's content to thearia-describedbyattribute of the input itself.Evidence
Turn on screen reader, focus an input that has an icon tooltip, the tooltip's content is not announced
The tooltip's content is announced right after the input's label
Fixes #6413