Skip to content

fix(splitter): meet minimum contrast for resize bars - #5531

Open
与世无争剑宇子 (yushiwuzhengjianyuzi) wants to merge 1 commit into
microsoft:devfrom
yushiwuzhengjianyuzi:fix/5505-multi-splitter-contrast
Open

与世无争剑宇子 (yushiwuzhengjianyuzi) wants to merge 1 commit into
microsoft:devfrom
yushiwuzhengjianyuzi:fix/5505-multi-splitter-contrast

Conversation

@yushiwuzhengjianyuzi

Fixes #5505

Summary

The resize bars use --colorNeutralStroke2 with an opacity of 0.4, which makes them too faint against the surrounding surface and fails the 3:1 non-text contrast target.

This change:

  • Uses the accessible neutral stroke palette for the default, hover, and active bar states.
  • Removes the 0.4 opacity and changes the hover opacity to 1.
  • Uses --colorNeutralBackground1 for the resize-handle icon so it remains legible against the darker bar.
  • Keeps the CSS custom properties documented in the MultiSplitter demo page in sync.

Reviewer notes

This is a visual/accessibility-only change. The updated colors rely on the existing Fluent design tokens and should adapt to both light and dark themes.

Test plan

  • dotnet build src/Core/Microsoft.FluentUI.AspNetCore.Components.csproj — passed with 0 warnings and 0 errors.
  • dotnet test tests/Core/Components.Tests.csproj --filter "FullyQualifiedName~Splitter" — 28 passed, 0 failed.
  • git diff --check — passed.

Checklist

  • I have added tests for my changes.
  • I have tested my changes.
  • I have updated the project documentation to reflect my changes.
  • I have read the CONTRIBUTING documentation and followed the standards for this project.

AI contribution declaration

AI assistance is allowed; fully AI-generated or autonomous pull requests without meaningful human review are not accepted. See the AI contribution policy.

  • I have read and followed the AI contribution policy.
  • I have personally reviewed and understood all changes, tested them, and take responsibility for this contribution.

Component-specific

  • I have added a new component
  • I have added Unit Tests for my new component
  • I have modified an existing component
  • I have validated the Unit Tests for an existing component

AI assistance: Codex was used to investigate the issue, implement the CSS/documentation changes, and run the listed validation. The author-review checkbox is intentionally left unchecked pending the author's review.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Human author review remains pending, and rendered contrast has not been independently verified in both light and dark themes.

No open issues 🎉

What changed in this PR

Updates FluentMultiSplitter resize-bar styling to address the 3:1 non-text contrast requirement in #5505.

Changes:

  • Uses accessible neutral stroke tokens for default, hover, and active bar states, with full opacity.
  • Uses the neutral background token for resize-handle icons.
  • Synchronizes the documented CSS custom-property defaults.
File Description
src/​Core/​Components/​Splitter/​FluentMultiSplitter.razor.css Updates resize-bar colors, opacity, and icon colors.
examples/​Demo/​FluentUI.Demo.Client/​Documentation/​Components/​Splitter/​MultiSplitter.md Documents the updated defaults and new hover-color property.

Review effort: Balanced

This branch has not been deployed

No deployments
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.

[FluentMultiSplitter, FluentMultiSplitterPane]: Color Contrast of the splitter is less than 3:1

2 participants