# Accessibility

The accessible text layer over each page. With it enabled (the default), every rendered page carries a transparent, selectable DOM copy of its text, positioned over the canvas, for screen readers, native find-in-page and native selection and copy.

- Interface: `AccessibilityConfig`
- Config path: `config.accessibility`

## Example

```ts
// Only when the host provides its own accessible representation of the document.
new PDFViewer(container, doc, { accessibility: { textLayer: false } });
```

## Options (1)

### `textLayer`

- Type: `boolean`
- Default: `true`
- Page: https://kernstra.com/docs/web-sdk/config/accessibility/textlayer

Accessible text layer over each page. **Screen readers** read pages in reading order (each page is an ARIA region labeled "Page N of M"): the text the viewer is designed to expose for a WCAG 2.1, Section 508 or EN 301 549 review. **Native find-in-page** matches text on rendered pages; Ctrl/Cmd+F opens the SDK's own Search, which covers the whole document, and the browser's find gets the key when Search is off ([`tools.search: false`](https://kernstra.com/docs/web-sdk/config/tools/search)) or shortcuts are ([`navigation.keyboardShortcuts: false`](https://kernstra.com/docs/web-sdk/config/navigation/keyboardshortcuts)). **Native selection & copy** work with no tool active ([`defaultTool: null`](https://kernstra.com/docs/web-sdk/config/mode/defaulttool)) — drag-select and Ctrl/Cmd+C like regular web text; the selection highlight aligns with the rendered glyphs. Select, the resting tool by default, selects and copies the same text with its own selection.

Set it to `false` only when the host application provides its own accessible representation of the document.

**License.** The text layer puts the page's words into the page's markup, where any script on the page can read them, so it is built only under a license that includes `extract` or whose output is clean (a production license). Under a development key without `extract`, an unverified or an unlicensed session, the pages are shown without it.

## Notes

The layer is built lazily for pages near the viewport and rebuilt automatically after every document change (edits, undo/redo, rotation, page management). While any tool is active the layer is pointer-inert — tools own all pointer interaction — but its text stays in the accessibility tree. Pages whose "text" is vector outlines (no text objects) have nothing to expose; that content is not readable by any PDF text extractor.

**Tagged documents.** A tagged PDF (the kind PDF/UA, the accessibility standard, requires) says what each drawing on a page is, so a screen reader reads the document in order. What the SDK draws keeps it so. Text added with the Add text tool becomes a paragraph of the document's structure, and a picture or a Sign-tool signature a figure, read after what is already on its page; a signature is read out as "Signature" (the `signature.alt` string), while a picture gets no description the SDK cannot know — give it one in an accessibility editor. Edited text stays where it was in the structure. What is not the document's own words — the license watermark, a black-out box — is marked as an artifact, which screen readers pass over. An untagged document is left untagged.

Keyboard access to the toolbar, panels and dialogs is described under [Keyboard shortcuts](https://kernstra.com/docs/web-sdk/guides/keyboard).


Web page: https://kernstra.com/docs/web-sdk/config/accessibility
