Skip to content

Accessibility ​

WCAG 2.2 AA is a design goal. What that means in practice:

The editable area ​

  • label is required: the editable area is a role="textbox" with aria-multiline and 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:

ControllerPatternKeyboard
createToolbarToolbarOne Tab stop, arrow keys, Home/End
createMenuMenu buttonArrow keys, Enter/Space, Escape, type to jump
createLinkPopoverDialog-like formMod-k, Escape
createImageDialogModal dialogFocus moves in and is kept inside, Escape
createBubbleMenuToolbar next to the selectionAlt-F10 to enter, Escape to return
createSuggestionMenuCombobox with a listboxFocus stays in the editor; arrows, Enter/Tab, Escape
createTooltipTooltip (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' } })