Repository navigation
[docs][button] Measure hover contrast in the 1.4.3 report - #49932
Merged
Merged
Conversation
The hover tint lowers the text and outlined label contrast. The default light primary Button drops to 4.37:1, and several dark-mode colors fall below 4.5:1 on a Paper surface. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-63efa0 # Conflicts: # docs/data/material/getting-started/accessibility/accessibility.md # docs/data/material/getting-started/accessibility/knownGaps.json # packages/mui-material/src/Button/accessibility.md # packages/mui-material/src/manual-testing.md
Deploy previewBundle size
PerformanceNo regressions in 32 benchmarks · precise to ±8.6% (±12.8% at worst) · ran 4m 45s · details Check out the code infra dashboard for more information about this PR. |
…r-63efa0 # Conflicts: # docs/data/material/getting-started/accessibility/accessibility.md
A hovered text or outlined error Button fails at elevation 1, so the workaround now asks for elevation 0, and elevation cannot help a contained Button. Mark the secondary Drawer value as borderline, and name the variants for the light info and warning hover ratios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…r-63efa0 # Conflicts: # docs/data/material/getting-started/accessibility/accessibility.md # docs/data/material/getting-started/accessibility/knownGaps.json # docs/data/material/getting-started/accessibility/scorecard.json # packages/mui-material/src/Button/accessibility.md
…r-63efa0 # Conflicts: # docs/data/material/getting-started/accessibility/accessibility.md
michelengelen
approved these changes
Dec 2, 2026
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.
The Button 1.4.3 report measured only the resting state and said that
:hoverand:activeneed a visual check. This PR adds the measured:hoverratios for all three variants and the six named palette colors, in light and dark mode.For those colors, the
textandoutlinedbackground on hover ispalette[color].mainataction.hoverOpacity(0.04 in light mode, 0.08 in dark mode) over the surface. Thecontainedbackground changes topalette[color].dark. Withcolor="inherit", the label takes its color from its parent, and acontainedbutton uses a gray hover background in the default theme.New failures on hover:
text/outlinedprimary(the default Button): 4.60:1 at rest, 4.37:1 on hover.containedsecondary:rgba(0, 0, 0, 0.87)on#ab47bcis 4.01:1 on every surface.text/outlinedon a Paper:errorfrom elevation 1 (4.19:1), andsecondary,info, andsuccesson a Dialog (4.22:1, 4.41:1, and 4.27:1). Thesecondaryvalue on a Drawer (4.49:1) is borderline.Changes:
Button/accessibility.md: the 1.4.3 gap, section, manual testing steps, and pass text.knownGaps.json: a note on the Button entry of the palette row. The darkerrorworkaround now asks for elevation 0 for a hoveredtextoroutlinedButton, and says that elevation does not help acontainedButton.manual-testing.mdand the accessibility overview: regenerated bypnpm a11y:scorecard.The 1.4.3 rating stays Partially Supports. The hover failures share the root cause of the existing palette gap, so they add no new warning.
:active(the ripple) is still a visual check.The values use the WCAG relative luminance formula with float compositing of the hover tint and the Paper overlay from
getOverlayAlpha.This builds on the dark-mode
errorresting results from #49552. The hover data follows them in the 1.4.3 section.Generated with Claude Code