Accessibility
WCAG 2.2 AA is a design goal. What that means in practice:
The editable area
labelis required: the editable area is arole="textbox"witharia-multilineand the name you give ('Article text'or{ labelledBy: 'heading-id' }).- The placeholder is announced, not only shown.
- Tab is not trapped: it indents list items and moves between table cells, and leaves the editor everywhere else.
The UI controllers
Everything in @writeon/ui, and the kit built on it, follows the WAI-ARIA Authoring Practices:
| Controller | Pattern | Keyboard |
|---|---|---|
createToolbar | Toolbar | One Tab stop, arrow keys, Home/End |
createMenu | Menu button | Arrow keys, Enter/Space, Escape, type to jump |
createLinkPopover | Dialog-like form | Mod-k, Escape |
createImageDialog | Modal dialog | Focus moves in and is kept inside, Escape |
createBubbleMenu | Toolbar next to the selection | Alt-F10 to enter, Escape to return |
createSuggestionMenu | Combobox with a listbox | Focus stays in the editor; arrows, Enter/Tab, Escape |
createTooltip | Tooltip (WCAG 1.4.13) | Shows on focus, Escape dismisses, hoverable |
Toggle buttons use aria-pressed, shortcuts are announced with aria-keyshortcuts, and a suggestion list announces how many options there are in a polite live region.
Images
Alt text is required unless the image is marked decorative (alt=""). Images without a description carry data-alt-missing, so you can point them out.
Translations
UI texts are English by default. @writeon/ui/locales/uz and @writeon/ui/locales/ru are included; pass them as messages, or override single texts:
ts
import uz from '@writeon/ui/locales/uz'
createToolbar(editor, { items, messages: uz })
createToolbar(editor, { items, messages: { bold: 'Strong' } })