Make the rich text editor toolbars a single tab stop with arrow-key navigation - #6108
Make the rich text editor toolbars a single tab stop with arrow-key navigation#6108rtibblesbot wants to merge 3 commits into
Conversation
953bca2 to
2871664
Compare
Roving tabindex over a container's `[data-toolbar-item]` controls, per the WAI-ARIA APG toolbar pattern: one tab stop, Left/Right between controls, wrapping and reversed in RTL. Excludes controls KListWithOverflow has hidden via `visibility`, and ignores arrow keys raised inside an open menu. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Mark every toolbar control `data-toolbar-item` and drive the toolbars with useRovingTabIndex, so Tab moves into the toolbar and then out. Unavailable ToolbarButtons carry `aria-disabled` instead of the native `disabled`, keeping them focusable and in the arrow-key order. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2871664 to
ac6bb0b
Compare
AlexVelezLl
left a comment
There was a problem hiding this comment.
Hey @rtibblesbot, on mobile, the mobile toolbar is not reachable via tab, could you fix it please, and make that the corresponding tab position on the RTE toolbar goes to the mobile toolbar instead?
|
@AlexVelezLl fixed in 1c54e96. The floating formatting bar rendered only while the editor content held focus ( On the tab position: the bar sits between the top bar and the content, which is where the RTE toolbar sits on desktop — Shift+Tab from the text now lands on it. One caveat worth your call: the bar is still only rendered once the content has been focused, so a first forward Tab through the editor passes from the top bar straight to the text. Rendering it earlier would make it visible before the keyboard opens; say the word if you want that instead. Class sweep: New specs cover the reachability fix (focus moves from the content into the bar and the bar survives), the single tab stop and arrow movement on both toolbars, and the unavailable format button keeping its place. @rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly |
MobileFormattingBar unmounted on editor blur, so Tab could never land in it. Keep it mounted while it holds focus, and give it and LinkBubbleMenu the same single tab stop as the other two role="toolbar" elements. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1c54e96 to
583f4d2
Compare
Summary
A
useRovingTabIndexcomposable keeps exactly one toolbar control attabindex="0"and moves focus with Left/Right, wrapping at both ends and reversed in RTL. Unavailable controls are markedaria-disabledrather thandisabled, so they keep their place in the arrow order. Wired into all fourrole="toolbar"elements in the editor:EditorToolbar,MobileTopBar,MobileFormattingBarandLinkBubbleMenu.References
Fixes #6104. Pattern: WAI-ARIA APG toolbar.
Reviewer guidance
MobileFormattingBaralso needed a mount fix: it rendered only while the editor content held focus, so Tab blurred the content and unmounted the bar before focus could land in it.AI usage
Used Claude Code to write the composable and its tests test-first against a pre-agreed plan, and to drive the toolbar in a browser for the capture above. Verified with the full Jest suite, pre-commit, an axe-core audit, and keyboard QA in Chromium.
@rtibblesbot's comments are generated by an LLM, and should be evaluated accordingly
How was this generated?
🟡 Waiting for feedback
Last updated: 2026-08-27 15:18 UTC