You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color due to which Automatic control not accessible using Shift-Tab key as well as Standard color is not accessible using Tab key same issue with Highlighted color control is getting trapped with tab key and not accessible using "Shift-Tab" #1944
User Experience:
Users who depend on keyboard will be impacted if "Automatic" control is not accessible using "Shift-Tab" key after you move inside Theme color picker or Standard Color picker. Keyboard functions and people that are blind or have low vision and people that use keyboard emulators cannot access the content which will confuse them.
Please Note: Standard Color picker is not accessible with pressing tab or arrow key at all.
Actual Result:
"Automatic" control is not accessible using "Shift-Tab" key upon navigating inside Theme color to pick a color.
Issue Reproduce for "No Color" control inside "Highlight color" button of the same dialog.
Expected Result:
"Automatic" control should be accessible using "Shift-Tab" key once you navigate inside Theme color/Standard color.
We observed the focus is getting trapped once you tab inside the theme color and it won't allow to come out of it due to that standard colors section also not accessible for keyboard users
Same issue for Highlighted color as well see attached screenshot, once you go inside color picker you wont able to come back outside using Shift-tab key.
changed the title [-]Accessibility Issue: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/-][+]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/+]on Jan 23, 2025
changed the title [-]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/-][+]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color due to which Automatic control not accessible using Shift-Tab key as well as Standard color is not accessible using Tab key same issue with Highlighted color control is getting trapped with tab key and not accessible using "Shift-Tab"[/+]on Feb 19, 2025
Hi @michaelmaillot
I'd like to pick this one up. I reproduced it on dev (7646538) with a small unit test.
Repro test (jest + enzyme, fails on dev)
it('lets Tab on the last swatch leave the group (#1944)',()=>{constall=swatches();constlast=all[all.length-1];last.focus();constpreventDefault=jest.fn();wrapper.find('button').filterWhere(b=>b.prop('id')===last.id).simulate('keydown',{which: KeyCodes.tab,keyCode: KeyCodes.tab,key: 'Tab', preventDefault });expect(document.activeElement.id).to.equal(last.id);// fails: focus wrapped to the first swatchexpect(preventDefault.mock.calls.length).to.equal(0);// fails: the group took the Tab key});
(Shift-Tab on the first swatch fails the same way: focus wraps to the last swatch.)
Based on my tests, what's happing is that each color group in SwatchColorPickerGroup is a FocusZone with handleTabKey={FocusZoneTabbableElements.all} and isCircularNavigation
(L17-L19).
The zone takes Tab/Shift-Tab and wraps them inside the group, so focus can't get back to "Automatic"/"No Color" or
move on to "Standard Colors". Font Color and Highlight color share this component.
Proposed fix: remove handleTabKey so the zone uses its default. Each group then becomes a single Tab stop:
Tab/Shift-Tab move between the default button and the groups, and the arrow keys move between swatches inside a group
(still circular). Optionally I can also switch the zone to bidirectional so Up/Down move between the swatch rows.
I'd leave #1942/#1943 for separate PRs.
Happy to open a PR with this approach if that works for you.
Activity
[-]Accessibility Issue: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/-][+]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/+][-]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color and Highlighted color due to which control is not accessible using "Shift-Tab"[/-][+]Accessibility Issue in RichText: Keyboard focus is getting trapped inside Theme color section of Font Color due to which Automatic control not accessible using Shift-Tab key as well as Standard color is not accessible using Tab key same issue with Highlighted color control is getting trapped with tab key and not accessible using "Shift-Tab"[/+]spaulah commentedon Nov 21, 2026
Hi @michaelmaillot
I'd like to pick this one up. I reproduced it on
dev(7646538) with a small unit test.Repro test (jest + enzyme, fails on dev)
(Shift-Tab on the first swatch fails the same way: focus wraps to the last swatch.)
Based on my tests, what's happing is that each color group in
SwatchColorPickerGroupis aFocusZonewithhandleTabKey={FocusZoneTabbableElements.all}andisCircularNavigation(L17-L19).
The zone takes Tab/Shift-Tab and wraps them inside the group, so focus can't get back to "Automatic"/"No Color" or
move on to "Standard Colors". Font Color and Highlight color share this component.
Proposed fix: remove
handleTabKeyso the zone uses its default. Each group then becomes a single Tab stop:Tab/Shift-Tab move between the default button and the groups, and the arrow keys move between swatches inside a group
(still circular). Optionally I can also switch the zone to
bidirectionalso Up/Down move between the swatch rows.I'd leave #1942/#1943 for separate PRs.
Happy to open a PR with this approach if that works for you.
michaelmaillot commentedon Nov 23, 2026
Hello @spaulah,
It's all yours!
RichText: let Tab leave the color swatch groups (pnp#1944)