fix: FluentColorPicker can't be used with the keyboard or a screen reader
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- csharp, html
- Domain
- accessibility, frontend
Research direction
Start with the SwatchPalette and ColorWheel markup, then read FluentColorPicker.ts for the HsvSquare pointer handling. Check how the picker exposes its selected color and handles focus, then compare the proposed radio and slider patterns with the existing component behavior. Done means all three views support keyboard operation and expose their color or value and selection state to screen readers.
Written by the indexing model from the issue text.
Description
🐛 Bug Report
FluentColorPicker can only be used with a mouse, in its three views:
- SwatchPalette: each color is a
<div>with an@onclickhandler, withouttabindex, role or accessible name. - ColorWheel: each color is an SVG
<polygon>with an@onclickhandler, also withouttabindex, role or name. - HsvSquare: the square and the hue bar are driven by pointer events in
FluentColorPicker.ts, with no keyboard handling and no role.
So keyboard users can't reach or select a color, and screen readers don't announce the colors or the selected one. With FluentColorPickerInput, typing the hex value in the text field is the only keyboard alternative, and the popover content isn't usable.
💻 Repro or Code Sample
<FluentColorPicker @bind-SelectedColor="@color" />
<FluentColorPicker View="ColorPickerView.ColorWheel" @bind-SelectedColor="@color" />
<FluentColorPicker View="ColorPickerView.HsvSquare" @bind-SelectedColor="@color" />
- Open https://fluentui-blazor.net/ColorPicker (or
/ColorPickerin the demo). - Press Tab: the focus skips the palette, wheel and square.
🤔 Expected Behavior
- SwatchPalette and ColorWheel: one tab stop for the picker, arrow keys to move between the colors, Enter / Space (or the move itself) to select, and the color name or value announced along with the selected state.
- HsvSquare: the square and the hue bar can be changed with the arrow keys, and their values are announced.
😯 Current Behavior
None of the views can be focused or used with the keyboard, and nothing is exposed to screen readers.
💁 Possible Solution
- SwatchPalette / ColorWheel: the radio group pattern:
role="radiogroup"on the container (with anaria-label),role="radio"+aria-checked+aria-label(the hex value, e.g. "#FF0000") on each color, and a rovingtabindex(only the selected color, or the first one, hastabindex="0"). The arrow keys move the focus in the grid (Left / Right in the row, Up / Down between rows) and select the color, like native radio buttons. - HsvSquare: the slider pattern:
role="slider"witharia-valuenow/aria-valuetexton the hue bar, and on the square indicator (saturation with Left / Right, brightness with Up / Down, using a 2D slider described witharia-valuetext, e.g. "Saturation 80%, brightness 60%").
Questions before I send a PR:
- Do you agree with the radio group pattern for the palette and the wheel?
- Is the hex value fine as the accessible name, or do you want color names (which would need a list of localized names)?
- Should the HsvSquare be a separate PR?
🌍 Your Environment
- OS & Device: Windows 11 on PC
- Browser: Microsoft Edge, Google Chrome
- .NET and Fluent UI Blazor library Version: .NET 10,
devbranch (v5)
- Dominant language
- C#
- Stars
- 4.9k
- Forks
- 497
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 47
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from microsoft/fluentui-blazor
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
microsoft/fluentui-blazor#5688 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 69/100
microsoft/fluentui-blazor#5687 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/fluentui-blazor#5684 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
microsoft/fluentui-blazor#5683 ·
Maintainers usually reply within 1 day
-
[FluentNumberInput ]: Screen reader does not announce the Spin Button role for the NumericType spin edit boxPossibly taken @vnbaaij claimed this 4 days ago. Opena11y A11yMAS A11ySev2 FluentUIBlazor_Web MAS4.1.2
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
microsoft/fluentui-blazor#5533 ·
Maintainers usually reply within 1 day
All issues in microsoft/fluentui-blazor
Similar issues
-
In-car displays show 0 km/h and P while the AV drivesPossibly taken @bazilinskyy claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
bazilinskyy/coupled-sim#366 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
BaryoDev/umbraco-pwa#196 ·
Maintainers usually reply within 1 day
-
bug flaky lsp-transport small
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
OpenTelemetryChatClient records gen_ai.response.finish_reasons as a JSON string instead of string[]Openarea-ai bug untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
dotnet/extensions#7995 ·
Maintainers usually reply within 1 day