# Keyboard and accessibility

> The keyboard shortcuts of Birch UI Document Editor, the toolbar and dialog patterns, screen-reader support, right-to-left text and translating the interface.

Every command works from the keyboard, and the shortcuts follow Microsoft Word. On macOS use <kbd>Cmd</kbd> where the table says <kbd>Ctrl</kbd>. The first table below is also exported as `SHORTCUTS`, so you can show it in your own help screen; the second table is not part of that export.

## Shortcuts

| Keys | Action |
| --- | --- |
| <kbd>Ctrl</kbd>+<kbd>B</kbd>, <kbd>I</kbd>, <kbd>U</kbd> | Bold, italic, underline |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd> | Strikethrough |
| <kbd>Ctrl</kbd>+<kbd>=</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>=</kbd> | Subscript / superscript |
| <kbd>Ctrl</kbd>+<kbd>]</kbd> / <kbd>Ctrl</kbd>+<kbd>[</kbd> | Grow / shrink the font |
| <kbd>Ctrl</kbd>+<kbd>Space</kbd> | Clear formatting |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>1</kbd> … <kbd>6</kbd> | Heading 1 to 6 |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> | Normal style |
| <kbd>Ctrl</kbd>+<kbd>L</kbd>, <kbd>E</kbd>, <kbd>R</kbd>, <kbd>J</kbd> | Align left, centre, right, justify |
| <kbd>Ctrl</kbd>+<kbd>1</kbd>, <kbd>5</kbd>, <kbd>2</kbd> | Single, 1.5 and double line spacing |
| <kbd>Ctrl</kbd>+<kbd>M</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | Increase / decrease indent |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd> | Bulleted list |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>7</kbd> | Numbered list |
| <kbd>Tab</kbd> / <kbd>Shift</kbd>+<kbd>Tab</kbd> | Demote / promote a list item, next / previous table cell, otherwise a tab character |
| <kbd>Ctrl</kbd>+<kbd>K</kbd> | Insert or edit a link |
| <kbd>Ctrl</kbd>+<kbd>Enter</kbd> | Page break |
| <kbd>Shift</kbd>+<kbd>Enter</kbd> | Line break |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>M</kbd> | New comment |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> | Track changes on or off |
| <kbd>Ctrl</kbd>+<kbd>F</kbd> / <kbd>Ctrl</kbd>+<kbd>H</kbd> | Find / replace |
| <kbd>Enter</kbd>, <kbd>Shift</kbd>+<kbd>Enter</kbd> in the find bar | Next / previous match |
| <kbd>Ctrl</kbd>+<kbd>Z</kbd> / <kbd>Ctrl</kbd>+<kbd>Y</kbd> | Undo / redo |
| <kbd>Ctrl</kbd>+<kbd>P</kbd> | Print the document |
| <kbd>Escape</kbd> in focus mode | Leave focus mode; the **Exit focus mode** button at the top of the window does the same |
| <kbd>Shift</kbd>+<kbd>F10</kbd> or the context menu key | Context menu |
| <kbd>Alt</kbd>+<kbd>F10</kbd> | Move focus to the ribbon (or the classic toolbar) |
| <kbd>F6</kbd> / <kbd>Shift</kbd>+<kbd>F6</kbd> | Move between the document, the mini toolbar, the ribbon, the ruler and open panes |
| <kbd>Alt</kbd> | Show ribbon key tips; type the letters shown to pick a tab and then a command |
| <kbd>Alt</kbd>+<kbd>Q</kbd> | [Search commands](https://docs.birchui.com/document/ribbon.md#search-commands) |
| <kbd>Ctrl</kbd>+<kbd>F1</kbd> | Collapse or expand the ribbon |
| <kbd>Shift</kbd>+<kbd>F3</kbd> | Cycle the case of the selection or the word at the cursor |
| <kbd>Escape</kbd> | Close the find bar, cancel the format painter, close menus and dialogs |

## More Word shortcuts

| Keys | Action |
| --- | --- |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>></kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd><</kbd> | Grow / shrink the font |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>A</kbd> | All capitals |
| <kbd>Ctrl</kbd>+<kbd>D</kbd> | [Font dialog](https://docs.birchui.com/document/dialogs.md#font) |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>K</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Double underline / small capitals / hidden text |
| <kbd>Ctrl</kbd>+<kbd>Space</kbd> | Remove character formatting |
| <kbd>Shift</kbd>+<kbd>F1</kbd> | [Reveal formatting](https://docs.birchui.com/document/dialogs.md#reveal-formatting) pane |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>V</kbd> | [Paste special](https://docs.birchui.com/document/dialogs.md#paste-special). Right after a paste it switches the format of that paste |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd>, then <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>V</kbd> on a selection | Copy formatting, then paste it onto the selection |
| <kbd>Ctrl</kbd>+<kbd>0</kbd> | Add or remove 12 pt of space before the paragraph |
| <kbd>Ctrl</kbd>+<kbd>T</kbd> / <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> | Increase / reduce the hanging indent |
| <kbd>Ctrl</kbd>+<kbd>Q</kbd> | Remove paragraph formatting |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>8</kbd> | Show or hide formatting marks |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Space</kbd> | Non-breaking space |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>-</kbd> | Non-breaking hyphen |
| <kbd>Ctrl</kbd>+<kbd>-</kbd> | Optional hyphen |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>-</kbd> | Em dash |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>.</kbd> | Ellipsis |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd> | Column break |
| <kbd>Ctrl</kbd>+<kbd>Delete</kbd> | Delete the next word |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F</kbd> / <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>D</kbd> | Insert a footnote / an endnote |
| <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>D</kbd> | Insert the date |
| <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Left</kbd> / <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Right</kbd> | Promote / demote a heading |
| <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Up</kbd> / <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Down</kbd> | Move the paragraph up / down |
| <kbd>Alt</kbd>+<kbd>Home</kbd> / <kbd>Alt</kbd>+<kbd>End</kbd> | First / last cell in the row |
| <kbd>Alt</kbd>+<kbd>PageUp</kbd> / <kbd>Alt</kbd>+<kbd>PageDown</kbd> | First / last cell in the column |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> | Styles pane |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> | Word count |
| <kbd>Ctrl</kbd>+<kbd>G</kbd> or <kbd>F5</kbd> | Navigation pane |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>F9</kbd> | Remove a link |
| <kbd>F9</kbd> / <kbd>Alt</kbd>+<kbd>F9</kbd> | Update fields / show field codes |
| <kbd>F7</kbd> | Check spelling (with a `spellcheck` function) |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>S</kbd> | Save a version |

### Shortcuts added for Google Docs users

| Keys | Action |
| --- | --- |
| <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | Paste as plain text. The paste options button still offers the other formats |
| <kbd>Ctrl</kbd>+<kbd>.</kbd> / <kbd>Ctrl</kbd>+<kbd>,</kbd> | Superscript / subscript |
| <kbd>Ctrl</kbd>+<kbd>\\</kbd> | Clear formatting |
| <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>5</kbd> | Strikethrough |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>0</kbd> | Normal text |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>H</kbd> | Highlight on or off |
| <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Version history |
| <kbd>Ctrl</kbd>+<kbd>/</kbd> | Keyboard shortcuts dialog |
| <kbd>Ctrl</kbd>+<kbd>O</kbd> / <kbd>Ctrl</kbd>+<kbd>S</kbd> | Open a file / save |

### Keys the browser keeps

A web page cannot take every key combination. In Chrome and Firefox on Windows and Linux the browser handles these itself and the editor never receives them:

- <kbd>Ctrl</kbd>+<kbd>T</kbd> opens a tab, so the hanging indent shortcut does not work, and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> reopens a closed tab.
- <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> opens a private window, so the Normal style shortcut does not work.
- <kbd>Ctrl</kbd>+<kbd>N</kbd> and <kbd>Ctrl</kbd>+<kbd>W</kbd> open a window and close the tab. The editor does not bind them.

These combinations reach the editor only where the host does not claim them: an embedded web view, an installed app window or a kiosk shell. Other shortcuts can be taken by the operating system or a browser extension in the same way. Every command behind a shortcut is also on the ribbon and available through `exec`, so offer those where the keys are not available: `exec('paragraphStyle', 'Normal')`, and `exec('paragraphFormat', { indentLeft, indentFirstLine })` for the hanging indent.

Because <kbd>Tab</kbd> inserts a tab in the document, as in every word processor, use <kbd>Alt</kbd>+<kbd>F10</kbd> to reach the toolbar and <kbd>Shift</kbd>+<kbd>Tab</kbd> from the toolbar to return to elements before the editor.

## Word and Google Docs shortcuts side by side

The common shortcuts of both products, and what each does here. "Kept by the browser" means that Chrome and Firefox act on the key themselves and a web page never receives it; see [Keys the browser keeps](#keys-the-browser-keeps).

| Action | Word | Google Docs | In the editor |
| --- | --- | --- | --- |
| Bold, italic, underline | <kbd>Ctrl</kbd>+<kbd>B</kbd>, <kbd>Ctrl</kbd>+<kbd>I</kbd>, <kbd>Ctrl</kbd>+<kbd>U</kbd> | same | Works |
| Strikethrough | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>X</kbd> (web: <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>5</kbd>) | <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>5</kbd> | Works, both |
| Superscript, subscript | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>=</kbd>, <kbd>Ctrl</kbd>+<kbd>=</kbd> | <kbd>Ctrl</kbd>+<kbd>.</kbd>, <kbd>Ctrl</kbd>+<kbd>,</kbd> | Works, both sets |
| Clear formatting | <kbd>Ctrl</kbd>+<kbd>Space</kbd> | <kbd>Ctrl</kbd>+<kbd>\\</kbd> | Works, both |
| Grow, shrink font | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>></kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd><</kbd>; <kbd>Ctrl</kbd>+<kbd>]</kbd>, <kbd>Ctrl</kbd>+<kbd>[</kbd> | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>.</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>,</kbd> | Works |
| Highlight | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>H</kbd> | none | Works |
| Heading 1 to 6 | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>1</kbd> … <kbd>6</kbd> | same | Works |
| Normal text | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>0</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>0</kbd> works; <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>N</kbd> is kept by the browser |
| Align left, centre, right, justify | <kbd>Ctrl</kbd>+<kbd>L</kbd>, <kbd>E</kbd>, <kbd>R</kbd>, <kbd>J</kbd> | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd>, <kbd>E</kbd>, <kbd>R</kbd>, <kbd>J</kbd> | Word's keys work. The Google Docs keys are not bound: with <kbd>Ctrl</kbd>+<kbd>Shift</kbd> they are Word's bulleted list and Track changes, and the browser reloads on <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>R</kbd> |
| Line spacing 1, 1.5, 2 | <kbd>Ctrl</kbd>+<kbd>1</kbd>, <kbd>5</kbd>, <kbd>2</kbd> | none | Works |
| Bulleted list, numbered list | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd>, none | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>8</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>7</kbd> | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>L</kbd> and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>7</kbd> work; <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>8</kbd> shows formatting marks, as in Word |
| Indent, outdent | <kbd>Ctrl</kbd>+<kbd>M</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>M</kbd> | <kbd>Ctrl</kbd>+<kbd>]</kbd>, <kbd>Ctrl</kbd>+<kbd>[</kbd> | Word's keys work; the bracket keys change the font size, as in Word |
| Undo, redo | <kbd>Ctrl</kbd>+<kbd>Z</kbd>, <kbd>Ctrl</kbd>+<kbd>Y</kbd> | same, and <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Works, all three |
| Cut, copy, paste | <kbd>Ctrl</kbd>+<kbd>X</kbd>, <kbd>C</kbd>, <kbd>V</kbd> | same | Works |
| Paste as plain text | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | same | Works |
| Paste special | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>V</kbd> | none | Works |
| Copy and paste formatting | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>V</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>C</kbd>, <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>V</kbd> | The <kbd>Ctrl</kbd>+<kbd>Alt</kbd> pair works; <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> is kept by the browser |
| Select all | <kbd>Ctrl</kbd>+<kbd>A</kbd> | same | Works |
| Find, replace | <kbd>Ctrl</kbd>+<kbd>F</kbd>, <kbd>Ctrl</kbd>+<kbd>H</kbd> | same | Works |
| Go to, navigation | <kbd>Ctrl</kbd>+<kbd>G</kbd>, <kbd>F5</kbd> | none | Works: opens the Navigation pane |
| Insert link | <kbd>Ctrl</kbd>+<kbd>K</kbd> | same | Works |
| Page break, column break, line break | <kbd>Ctrl</kbd>+<kbd>Enter</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>Enter</kbd>, <kbd>Shift</kbd>+<kbd>Enter</kbd> | <kbd>Ctrl</kbd>+<kbd>Enter</kbd>, none, <kbd>Shift</kbd>+<kbd>Enter</kbd> | Works |
| New comment | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>M</kbd> | same | Works |
| Track changes (suggesting) | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>E</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Z</kbd> | Word's key works |
| Footnote, endnote | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F</kbd>, <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>D</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>F</kbd>, none | Works |
| Word count | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>G</kbd> | <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> | Word's key works; <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>C</kbd> is kept by the browser |
| Version history | none | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>H</kbd> | Works |
| Font dialog | <kbd>Ctrl</kbd>+<kbd>D</kbd> | none | Works |
| Open, save, print | <kbd>Ctrl</kbd>+<kbd>O</kbd>, <kbd>Ctrl</kbd>+<kbd>S</kbd>, <kbd>Ctrl</kbd>+<kbd>P</kbd> | same | Works |
| New document | <kbd>Ctrl</kbd>+<kbd>N</kbd> | none | Kept by the browser. Use File, New |
| Shortcut list | none | <kbd>Ctrl</kbd>+<kbd>/</kbd> | Works |
| Search the commands | <kbd>Alt</kbd>+<kbd>Q</kbd> | <kbd>Alt</kbd>+<kbd>/</kbd> | <kbd>Alt</kbd>+<kbd>Q</kbd> works |
| Delete the previous or next word | <kbd>Ctrl</kbd>+<kbd>Backspace</kbd>, <kbd>Ctrl</kbd>+<kbd>Delete</kbd> | same | Works |
| Start or end of the document | <kbd>Ctrl</kbd>+<kbd>Home</kbd>, <kbd>Ctrl</kbd>+<kbd>End</kbd> | same | Works |
| Move a paragraph up or down | <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Up</kbd>, <kbd>Alt</kbd>+<kbd>Shift</kbd>+<kbd>Down</kbd> | same | Works |
| Hanging indent | <kbd>Ctrl</kbd>+<kbd>T</kbd>, <kbd>Ctrl</kbd>+<kbd>Shift</kbd>+<kbd>T</kbd> | none | Kept by the browser. Use the Paragraph dialog or the ruler |
| Check spelling | <kbd>F7</kbd> | <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>X</kbd> | <kbd>F7</kbd> works with a `spellcheck` function |

<kbd>Ctrl</kbd>+<kbd>/</kbd> opens the **Keyboard shortcuts** dialog, which lists every shortcut of the editor in the language of the interface: the general ones first, then those of each ribbon tab, with a search box that matches names and keys. It is also on the File tab and in the command search, and `exec('keyboardShortcuts')` opens it from code.

## Structure

- The editing surface is a `role="textbox"` with `aria-multiline="true"` and the label from `ariaLabel` (default "Document"). Headings are real `h1`–`h6` elements, lists are `ul` and `ol`, and tables are `table` elements, so screen readers' navigation commands work inside the document.
- The ribbon uses the WAI-ARIA tabs pattern for its tabs (<kbd>Left</kbd>, <kbd>Right</kbd>, <kbd>Home</kbd> and <kbd>End</kbd> switch tabs, <kbd>Down</kbd> enters the commands) and the toolbar pattern for the commands of a tab: one tab stop, arrow keys with a roving tabindex, <kbd>Up</kbd> returns to the tab and <kbd>Escape</kbd> returns to the document. Split buttons expose the main action and the menu as two buttons, galleries are groups of toggle buttons, and groups that do not fit collapse into a labelled menu button.
- The ruler's tab stops and margin boundaries are sliders too: arrow keys move them, <kbd>Delete</kbd> removes a tab stop and <kbd>Enter</kbd> opens the Tabs dialog. Everything the ruler does is also available in the Paragraph, Tabs and Page setup dialogs.
- The classic toolbar (`ribbon: false`) follows the WAI-ARIA toolbar pattern: one tab stop, arrow keys, <kbd>Home</kbd> and <kbd>End</kbd> move between controls, toggles report `aria-pressed`, menus report `aria-haspopup` and `aria-expanded`, and unavailable commands stay focusable with `aria-disabled`. Items that do not fit move into a **More tools** menu.
- The Search commands box is a `role="combobox"` that controls a `role="listbox"`; the highlighted option is exposed with `aria-activedescendant`, so focus stays in the box while the arrow keys move through the list.
- Menus use `role="menu"` with arrow-key navigation, and dialogs are modal with a focus trap; <kbd>Escape</kbd> returns focus to where it was.
- The ruler's indent markers are sliders with their value announced in centimetres or inches.
- Header and footer areas are buttons that open their editor with <kbd>Enter</kbd>.
- A polite live region announces tracking on and off, page count changes, find results, replacements and new comments. It also announces the formatting at the cursor when it changes, the page and section when the cursor moves to another one, and the tracked change or comment the cursor enters; see [Accessibility](https://docs.birchui.com/document/accessibility.md#announcements).
- Comments, tracked changes and find matches never rely on colour alone: changes are underlined or struck through, comments are underlined, and the current match is outlined.
- Motion is disabled when the user prefers reduced motion. In forced-colours mode pressed buttons are filled with the highlight colour, the selected ribbon tab is boxed, focus has its own outline, and comments, selected cells, dialogs and the page keep a visible edge.

## Right-to-left text

Set `rtl: true`, or put the editor in an element with `dir="rtl"`, to mirror the interface. Individual paragraphs can be right-to-left with `exec('textDirection', 'rtl')`; they export to Word with `w:bidi`. The ruler and list indents follow the paragraph direction.

## Translating the interface

Every string goes through the shared Birch UI translator. Pass `localeText` with the keys you want to change, or set them once for every component with `setDefaultLocaleText` from `@birchui/core`:

```ts
createDocumentEditor(host, {
  localeText: {
    'document.bold': 'Fett',
    'document.italic': 'Kursiv',
    'document.pageOf': 'Seite {page} von {pages}',
    'document.wordCount': '{count} Wörter',
    'document.trackChanges': 'Änderungen nachverfolgen',
  },
});
```

Keys start with `document.`; the [API page](https://docs.birchui.com/document/api.md) lists the most used ones.

## The shortcut list as data

`WORD_SHORTCUTS` is the list of the Word shortcuts the editor adds on top of the basic ones, with the keys and an English label for each. Use it to build a help panel of your own.

```ts
import { WORD_SHORTCUTS } from '@birchui/document';

for (const { keys, label } of WORD_SHORTCUTS) console.info(`${keys}: ${label}`);
```
