RebodocsDocs
Start3
What is Rebodocs
Getting started
Demos to run
Put it in your app8
React component
Headless: your own UI
A complete interface
Without a framework
Only to read: the viewer
Styling and Tailwind
Phones and touch
Accessibility
Documents8
Templates and variables
On a server: DOCX and PDF
Documents in an S3 bucket
Letterheads
Versions
Tracked changes
Fonts
Languages
Together2
Real-time collaboration
AI assistants (MCP)
Reference5
Packages
Components and hooks
Editor API
How it works
Status and roadmap
↑↓ to move↵ to openEsc to close26 pages

Put it in your app Accessibility

Accessibility

The pages are drawn as positioned pieces of text a screen reader cannot follow. So the editor tells the screen reader what happens instead, and every part around the pages works from the keyboard. It follows WCAG 2.2 at level AA, with the exceptions said below.

tip: move with the arrows in the document below, and read what a screen reader would say
Live

What a screen reader hears

A real editor and its live regions, the hidden places a screen reader reads aloud: each line is something it would say. A ! is said at once, over what it was saying; a dot, when it is free.

Opening the editor…

The field that has the keyboard is called “Document”, and its description gives the keys to leave it. The pages, the caret and the selection are hidden from screen readers (aria-hidden): what they show is said.

Spoken

What is said

After each key. What the editor says is in the language of the interface; the text of the document, in the language of the text, so a screen reader reads each with its own voice.

What the caret moved over

The letter with the arrows, the word with Alt (Ctrl on Windows) and an arrow, the line with up, down, Home and End. A space, a tab and the end of a paragraph by their name.

e · Reservation · space · end of paragraph

Where it is, when that changes

Before the text, on reaching another paragraph: the page, a heading, a table cell, leaving the table, a list and its level; and a link, or a change someone made, on reaching it.

Table, row 2, column 1. Deposit

What is there that is not text

A picture by its description, as Word keeps it; a text box; the number of a note at the foot of the page, and then the letter after it.

Picture: Plan of the flat… · Footnote 1, space

What was selected

What a key added to the selection or took from it. A long selection gives its start and its length, not the whole text.

r, selected · All selected

What a key did

What it deleted, a format turned on or off, undoing and redoing, pasting, going into the header or the footer.

o, deleted · Bold, on · Nothing to undo

Pictures and their description

A picture is read by the description Word keeps for it (its “Alt Text”), which a DOCX brings and takes back. One without it is read as “Picture without a description”. Select a picture and press Description in the bar beside it to write one; an assistant does it with edit_image, and reads it in [image: …]. In code:

import { altText, setAltText } from '@rebodocs/core';

altText(run.props.object);                              // 'Plan of the flat: …', or undefined
doc = setAltText(doc, { para: 7, offset: 0 }, 'Plan of the flat: a living room and two bedrooms');
Mode

Screen reader mode

⌘⌥Z (Ctrl+Alt+Z on Windows and Linux) turns it on and off, as in Google Docs. The hidden field then holds the paragraph the caret is in, with the caret and the selection where they are.

The screen reader reads it with its own commands (the current line, the word, spelling it out), and a braille display shows it. The editor stops saying the text, so it is not heard twice, and says only where the caret is: the page, the table, the heading. Turn it on in the demo above and watch the hidden field.

editor.screenReader = true;   // or let the person press ⌘⌥Z (Ctrl+Alt+Z)

What is typed in this mode goes into the document as usual. A keyboard that composes words (Chinese, Japanese, a phone’s) puts in the word when it is finished, not letter by letter.

Keys

The keyboard

Everything around the pages can be reached and used without a mouse.

Alt+F10
To the toolbar.
F6 · Shift+F6
From one part to the next, as they are on the page: the toolbar, the ruler, the side panel, the document, the status bar, and the find bar while it is open.
Escape
From any part back to the document. In a menu, back to the button that opened it.
Tab
In the toolbar, one stop; the arrows, Home and End go along it.
Enter · ↓
On a button with a menu, opens it with the keyboard inside; the arrows go through it, and through grids (the size of a table, colours) in both directions.
A tap of ⌘ (Ctrl)
Shows the bar beside the selection. Tab goes into it, the arrows along it, Tab or Escape back to the text.
/
At the start of a paragraph or after a space, the “/” menu: it is said, with how to use it; the keyboard stays in the text, ↑ and ↓ go through it and say each one, Enter or Tab does it, Escape leaves the “/” as text.
{{
The list of the variables, used as the “/” menu is; the one chosen is written whole.
Tab · Shift+Tab
In a document restricted to areas to fill in, from one area to the next, selecting what it holds; a change outside them is refused and said to be.
⌘⌥Z (Ctrl+Alt+Z)
Screen reader mode, on and off.
The ruler

Each margin and indent is a slider read in centimetres: the arrows move it a quarter of a centimetre, Shift a whole one, Alt a point. On the button at its corner, Enter changes the kind of tab stop and Insert sets one at the caret; a tab stop moves with the arrows and goes with Delete.

Dialogs and the menu

The document menu, page setup, indents, the picture grid and the comparison of versions keep Tab inside them while they are open, and give the keyboard back to what had it when they close. Pictures in the grid move with buttons as well as by dragging.

The side panel

Its tabs are a tab list: one stop, and the arrows go from one to the next.

The keys of the document itself, to type and format, are on the page Editor API.

Seen

What is seen

For whoever sees the screen, but not all of it, or not in its colours.

Focus

A ring around whatever has the keyboard, in every part.

Contrast

Text of the interface is at least 4.5:1 against its background: measured on every piece of text of the toolbar, the ruler, the side panel and the status bar.

Target size

Buttons and choices are at least 24 pixels, or that far apart. The handles of the ruler are smaller, as WCAG allows when a control of that size does the same: Page setup for the margins, and Indents… (in the spacing menu of the toolbar, or a double click on a handle) for the indents, typed in centimetres.

The language of the text

Chosen at the foot of the editor, or given with the language prop, or the one the file says; for a document that says none, the interface’s when it was opened, which changing the interface later leaves as it is. The field of the document and what is read from it are marked with it, so a screen reader reads a Spanish text with a Spanish voice under an English interface.

Colours by name

“Dark gray”, “sky blue”, not a number; the colour button says the one in use.

High contrast

With the colours of the system forced on the page, as Windows does, the selection, the caret, the find results, what is on and what has the keyboard stay visible. The pages keep their own colours: they are the document as it prints.

Less motion

With “reduce motion” set, the caret does not blink and the menu does not slide.

PDF

The PDF

A PDF made from a document is tagged: a screen reader finds in it what the document is made of, in the order it is written, and in its language.

Making the PDF…

The lease of the demo above, made into a PDF in this page with renderPdf and read back out of the PDF: each tag, and the text the pages give it. Take the language or the description away and it stops saying it is PDF/UA.

Headings

By the level of their style, Title and Heading 1 as H1. They are the bookmarks in the side bar of the reader as well.

Lists

Each item with its number or bullet apart from its text, a deeper level inside the item before it.

Tables

Rows and cells, a heading row as heading cells of their column, merged cells with the rows and columns they cover. A heading row drawn again on the next page is read once.

Pictures

Read by their description. One Word was told is decorative is skipped, as are those of headers.

Notes and links

A note after the paragraph of its reference; a link with the address it goes to, and Tab goes through the links in the order they are read.

What is not read

Headers, footers, borders, shading and the lines between columns are marked as decoration, which a screen reader skips.

const { pdf } = renderPdf(doc, fonts, 'Lease of the flat', 'es-MX');   // on a server
const bytes = await editor.exportPdf('Lease of the flat');            // in the browser, in the language of the text

The language is the one given, or the one chosen at the foot of the editor, or the one the file says (in the editor, for a document that says none, the interface’s when it was opened). When the PDF has a title and a language, every font is inside it and every picture has a description, it says it is PDF/UA, the standard for PDFs anyone can read, and veraPDF, its checker, finds nothing in it. A font the browser has no file for is not inside it, so a PDF exported from the editor in that font does not say so; on a server, give the font files. What the document itself gets wrong, a heading level skipped or a picture without a description, stays in the PDF as it is.

Your UI

For your own interface

With the headless hooks the bars are yours, and so is making them accessible.

  • Give buttons that stay on aria-pressed, buttons that open a menu aria-haspopup and aria-expanded, and colour swatches a name.
  • The document keeps saying what the caret meets, as it does in the editor’s own interface: that is the editor’s, not the bars’.
  • Say what your buttons do that cannot be seen from the document, through the editor’s live regions:
editor.announce('Document saved');        // said when the screen reader is free
editor.announce('Could not save', true);   // said at once, over what it was saying
Honest

What is not checked

  • Real screen readers. VoiceOver, NVDA and JAWS each read a live region and a text field in their own way. What is announced was checked in Chrome, by reading the live regions after each key, not by listening.
  • Screen reader mode relies on the screen reader following the caret of a field the editor moves. That is how they work, but it needs trying with each one.
  • The tagged PDF was checked with veraPDF and read back with Poppler, not with Acrobat or a screen reader reading it.
  • The automated audit needs a browser, so it is not run with the tests: npm run a11y -- <url> runs axe on the editor of a page, in a Chrome without a window, as it opens and with the caret in it. It finds nothing on the pages of this site.