Repository navigation
[test][form label] Add axe tests and WCAG conformance report - #49552
Open
michelengelen wants to merge 2 commits into
Open
michelengelen wants to merge 2 commits into
michelengelen wants to merge 2 commits into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Deploy previewBundle size
PerformanceNo regressions in 32 benchmarks · ran 4m 00s · details Check out the code infra dashboard for more information about this PR. |
This was referenced Oct 28, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
This branch has not been deployed
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.
Adds axe coverage, WCAG unit tests, and a WCAG 2.2 Level A/AA conformance report for
FormLabel. This is Wave 1, item 6 of #49260. Part of #49410.FormLabel
Known gaps:
requiredgroup legend, the asterisk isaria-hidden. Checkbox, Radio, and Switch do not takerequiredfrom FormControl, and RadioGroup has norequiredprop, so assistive technology gets no required state. FormLabel owns this gap. A unit test pins it for Checkbox.maincolor of its field:info(3.86:1) andwarning(3.11:1) fail in light mode. In dark mode, the error label falls below 4.5:1 on a Paper with elevation 2 or more, such as a Menu or Dialog (4.30:1 at elevation 2, 3.13:1 at elevation 24). The elevation overlay lightens the surface.Report:
FormLabel/accessibility.mdChanges
FormLabel.test.js"WCAG 2.2 conformance" block covers:component="legend"renders alegendelement that names the fieldset group.htmlForis forwarded as theforattribute. A Checkbox does not getrequiredfrom FormControl (documented gap).error.mainover the elevation overlay at elevation 2 and 24, and asserts both are below 4.5:1.requiredfrom FormControl.form-labelslug, with a docs folder that holds onlyform-label.a11y.json.FormLabelA11yStatesandFormLabelA11yColorMatrixDarkassert every rule.FormLabelA11yColorMatrixrecords the light-modecolor-contrastfailure without asserting it.requiredon FormControlLabel, which forwards it to its control.infoandwarning.errortext below 4.5:1 on a Paper with elevation 2 or more. It affects FormLabel and TextField. Another PR adds the same row text with a different affected list. Merge the two lists when both land.required". RadioGroup has norequiredprop. The text now says to setaria-required="true"on the RadioGroup.Decisions for review
The Form* reports now use these team rating rules:
Decisions for FormLabel:
htmlForadds its area to the target of its field, so the field report rates 2.5.2 and 2.5.8.requiredstate, as in TextField. On a group legend, nothing duplicates it, so the gap is rated under 1.3.1.aria-required="true"on the RadioGroup, because the pass condition fails without it.Merge order with the sibling Wave 1 PRs
Do not hand-merge the generated blocks: after each rebase, run
pnpm a11y:scorecard.knownGaps.json,demoMeta.ts,demoMeta.test.ts, andcriteriaSuites.mjsconflict with the other Wave 1 PRs as adjacent insertions.Not done in this PR
Follow-ups (tracked in #49477)
aria-requiredon RadioGroup,requiredon a single Checkbox or Switch, and the legend text for a checkbox group.warningfor the focused label.InputLabeluses the FormLabel styles, so focusedinfofails too.🤖 Generated with Claude Code