Improve toolbar accessibility by following W3C APG Toolbar example
Closed
RI
5mo ago+2159+2159+0123456789012345678901234567890123456789-384-384-012345678901234567890123456789
This improves the toolbar accessibility by following the W3C APG Toolbar example and standards.
- Gives the toolbar a roving tabindex
- Left / Right / Home / End toolbar navigation
- Toolbar focus is remembered between edits and going back to the toolbar
Summary by cubic
Makes the formatting toolbar follow the W3C APG Toolbar pattern for better accessibility. Adds predictable keyboard navigation, accurate pressed states, and stable focus between the editor and toolbar.
- New Features
- Roving tabindex across toolbar items with Left/Right/Home/End navigation; focus is remembered when returning from the toolbar.
- ARIA: toolbar now links to the textarea via
aria-controls; auto-ids are created when missing; toggle buttons updatearia-pressed. - Button API: added
isActiveto set pressed state and theactiveclass, plus optionalactionIdfor canonical actions. - Docs and tests: README documents
isActive; addedtest/toolbar.test.js;npm testincludes the new suite.