fix: FluentColorPicker can't be used with the keyboard or a screen reader
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 52/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- csharp, html
- Ambito
- accessibility, frontend
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
🐛 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)
- Lingua principale
- C#
- Stelle
- 4.9k
- Fork
- 497
- Merge medio
- 1g 1h
- PR unite (30g)
- 47
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di microsoft/fluentui-blazor
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
microsoft/fluentui-blazor#5688 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
microsoft/fluentui-blazor#5687 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/fluentui-blazor#5684 ·
I maintainer di solito rispondono entro 1 giorno
-
fix: checked task-list declarations using * or + fail the contribution checkForse già presa Una pull request collegata a questa issue è aperta o già unita. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
microsoft/fluentui-blazor#5683 ·
I maintainer di solito rispondono entro 1 giorno
-
[FluentNumberInput ]: Screen reader does not announce the Spin Button role for the NumericType spin edit boxForse già presa @vnbaaij l’ha presa 4 giorni fa. Apertaa11y A11yMAS A11ySev2 FluentUIBlazor_Web MAS4.1.2
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
microsoft/fluentui-blazor#5533 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di microsoft/fluentui-blazor
Issue simili
-
In-car displays show 0 km/h and P while the AV drivesForse già presa @bazilinskyy l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
bazilinskyy/coupled-sim#366 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
BaryoDev/umbraco-pwa#196 ·
I maintainer di solito rispondono entro 1 giorno
-
bug flaky lsp-transport small
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
OpenTelemetryChatClient records gen_ai.response.finish_reasons as a JSON string instead of string[]Apertaarea-ai bug untriaged
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
dotnet/extensions#7995 ·
I maintainer di solito rispondono entro 1 giorno