Accessibility
What the host page provides, how the keyboard moves through the editor, what a screen reader hears, and the known limits.
The editor gives names, roles, and keyboard support to its controls. The page around the editor is yours. This page tells you what to add to the page, and what the editor provides.
Prepare the host page
The editor renders inside your page. It adds one landmark, the region "Presentation editor" around its viewport. It adds no other page-level structure. Give the page these items:
- A
langattribute on<html>. - A
<title>that names the page. - One
<main>landmark that contains the editor. - A page heading (
<h1>). The heading can be visually hidden. - A label for each control of your own, such as the file input that opens a deck.
- A
titleandallow="fullscreen"on an<iframe>that holds the editor. The slide show asks for full screen (see Installation).
Use this host page structure:
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Quarterly review | Deck editor</title>
</head>
<body>
<main>
<h1>Quarterly review</h1>
<label>Open a .pptx file <input type="file" accept=".pptx" /></label>
<div id="editor" style="height: 80vh"></div>
</main>
</body>
</html>If your own <header> or <main> is inside the viewport, set label={false} on PptxEditor.Viewport (:label="false" in Vue). The viewport then adds no region, and your landmarks stay at the top level. To change the region name, give label a text or a translation key.
The demos in examples/ follow these rules. The quickstart shows the <main> landmark and the file input label.
If you build your own controls, keep them accessible. A disabled control stays focusable with aria-disabled and tells the user why it is off. See Customization.
Use the keyboard
The editor follows the WAI-ARIA authoring practices. Each composite part, such as the slide, the toolbar, or the slide list, is one Tab stop. The arrow keys move inside it. The chrome shows a focus ring on keyboard focus.
On the slide
The slide is one Tab stop (role group). When the slide has focus, these keys apply:
| Key | Action |
|---|---|
| Tab, Shift+Tab | Select the next or the previous shape, in z-order. With no selection, Tab selects the backmost shape and Shift+Tab the frontmost. |
| Tab on the last shape, Shift+Tab on the first | Clear the selection and move focus out of the slide. The slide never traps focus. |
| Enter or F2 | Start to edit the text of the selected shape, with all of its text selected. On a group, Enter selects the shapes in the group. |
| A character key | Start to edit the text of the selected shape, and type that character at the end of its text (in the editing mode only). |
| Escape | Leave text editing and select the shape. Leave a group and select the group. Otherwise, clear the selection. |
| Arrow keys | Nudge the selected shapes by 8 px. Ctrl/Cmd+arrow nudges by 1 px. Shift multiplies the step by 10. |
| Delete, Backspace | Delete the selected shapes. |
| Ctrl/Cmd+D | Duplicate the selected shapes. |
| Ctrl/Cmd+A | Select all shapes, or all text when you edit text. |
Inside a group, Tab and Shift+Tab cycle through the shapes of the group.
While you edit text, Tab and Shift+Tab change the list level at the start of a list item or across paragraphs. Elsewhere, both keys insert a tab. Enter starts a new item at the same level, also on an empty item. Backspace at the start of a list item removes its bullet or number and keeps its level. The next Backspace joins it to the previous paragraph. Press Escape first to move with Tab again. In a table cell, Tab and Shift+Tab move to the next or the previous cell. See Tables.
While you edit text
| Key | Action |
|---|---|
| Ctrl/Cmd+B, I, U | Bold, italic, underline. |
| Ctrl/Cmd+L, E, R, J | Align the paragraph left, center, right, or justified. On selected shapes, align all of their text. |
| Ctrl/Cmd+Shift+>, Ctrl/Cmd+Shift+< | The next larger or smaller font size. On selected shapes, all of their text. |
| Ctrl/Cmd+], Ctrl/Cmd+[ | Move the paragraph one list level down or up. |
| Shift+F3 | Change the case of the selection or of the word at the caret: Capitalize Each Word, UPPER CASE, lower case. |
| Ctrl/Cmd+=, Ctrl/Cmd+Shift+= | Subscript, superscript. |
| Ctrl/Cmd+\ | Clear the character formatting. |
| Ctrl/Cmd+Shift+C, Ctrl/Cmd+Shift+V | Copy and paste the formatting. |
| Alt/Ctrl+Left, Alt/Ctrl+Right | Move to the start of the previous word or of the next word. Add Shift to select. |
| Alt/Ctrl+Up, Alt/Ctrl+Down | Move to the start of the paragraph, or of the next paragraph. |
| Cmd+Up, Cmd+Down, Ctrl/Cmd+Home, Ctrl/Cmd+End | Move to the start or the end of the text. |
| Alt/Ctrl+Backspace, Cmd+Backspace | Delete the word before the caret. |
| Shift+Enter | Start a new line in the same paragraph. |
In right-to-left and mixed-direction text, Left and Right move the caret one place on screen, not in reading order. Alt/Ctrl+Left and Alt/Ctrl+Right move past one word on screen. Cmd+Left and Cmd+Right move to the left or the right edge of the line. Home and End move to the start and the end of the line in reading order, wherever they show on screen. A selection holds the text between its two ends in reading order, so on a mixed-direction line it can show as several highlighted parts.
The editor makes no automatic capitals, curly quotes, dashes, or spelling corrections of its own. Mobile keyboards, and systems and browsers that offer such changes, apply them. The editor replaces the text that each change targets. Undo removes the change, together with any text you type right after it. Browser spelling tools and browser extensions that write to the text input change the document in the same way as typing. Many desktop browsers offer no such changes. In those browsers, the editor adds no curly quotes or capitals while you type.
AutoCorrect still makes these changes:
(c),(r), and(tm)become ©, ®, and ™....becomes …, and1/2,1/4, and3/4become fractions.1.,1),*, or-and a space at the start of a paragraph start a numbered or bulleted list. Press Backspace or Ctrl/Cmd+Z right after to keep the typed text.
To turn AutoCorrect off, pass autoCorrect: false to createPptxEditor, set autoCorrect={false} on the React editor, or set :auto-correct="false" on the Vue editor. This option does not change the system replacements.
In the speaker notes field, Ctrl/Cmd+B, I, and U format the text. The other keys in this table and AutoCorrect apply on the slide only.
Toolbar, menus, and dialogs
- The toolbar is one Tab stop. The Left and Right arrow keys, Home, and End move through its controls. In a right-to-left interface, Left and Right change places.
- The ribbon tabs are a
tablist. The Left and Right arrow keys, Home, and End move between tabs. - The menu bar is one Tab stop. Escape closes a menu and keeps focus on its menu bar item.
- A popover, such as a color or font picker, returns focus to its trigger on Escape.
- A context menu returns focus to where it was on Escape. Shift+F10 and the context menu key open it from the keyboard.
- A dialog keeps Tab inside it. Escape closes it, and focus goes back to the control that opened it.
Slide list and slide sorter
The slide list in the rail is one Tab stop. The focused slide is the current slide.
| Key | Action |
|---|---|
| Up, Down (Left, Right in a horizontal rail) | Go to the previous or the next slide. |
| Home, End | Go to the first or the last slide. |
| Shift+arrow, Shift+Home, Shift+End | Extend the slide selection. |
| Ctrl/Cmd+arrow | Move the selected slides. |
| Enter, Ctrl+M | Add a slide. |
| Delete, Backspace | Delete the selected slides. |
| Ctrl/Cmd+D | Duplicate the selected slides. |
| Shift+F10, context menu key | Open the slide menu. |
In the viewing mode, the slide list keys that change the deck do nothing, and the editor tells why. With sections, the list is a tree: the arrow keys also stop on each section header. Home and End go to the first and the last row, which can be a section header.
The slide sorter is one Tab stop. The arrow keys move through the grid of slides. Home and End go to the start and the end of the grid. Enter opens the focused slide. Shift+arrow, Ctrl/Cmd+arrow, Delete, Ctrl/Cmd+D, Ctrl+M, and Shift+F10 work as in the slide list.
Slide show
F5 starts the show from the first slide that is not hidden. Shift+F5 starts it from the current slide.
| Key | Action |
|---|---|
| Right, Down, Page Down, Space, N, Enter | Next slide |
| Left, Up, Page Up, Backspace, P | Previous slide |
| Home, End | First or last slide |
| A number, then Enter | Go to that slide |
B or ., W or , | Show a black or a white screen |
| Escape | End the show |
Tab moves through the buttons of the slide show control bar.
Hear the editor with a screen reader
The editor takes its accessible names from the locale catalog, so they change with the language. With the English catalog, a screen reader hears these items:
| Where | What the screen reader hears |
|---|---|
| Editor | A region "Presentation editor" that holds the chrome and the slide. |
| Slide | The group name "Slide 3 of 12". The name changes when the slide changes. Inside it, the slide text and an image for each picture that has alt text. The image name is the alt text. A decorative picture, or a picture with no alt text, is hidden. |
| Shape selection | A polite announcement with the kind and the name of the shape, for example "Shape Title 1, selected". For a picture with alt text, the alt text comes after the name: "Picture Logo, A green leaf, selected". It comes when Tab or a click selects one shape. |
| Text editing | The text input "Text of the selected shape", with the description "Shows the text of the current paragraph up to the caret". Its value is that text. |
| Table cell | A polite announcement, "Row 2, column 3", when the caret moves to a cell. |
| Link in the text | A polite announcement, "Link: https://example.com. Press F6 for its actions." F6 moves focus to the link actions. |
| Slide list | A navigation region "Slides" with a list box "Slides". With sections, the list is a tree. Items are "Slide 4", or "Slide 4 (hidden)" for a hidden slide. |
| Speaker notes | A region "Speaker notes", with a multiline text box. |
| Status bar | A polite announcement, "Slide 3 of 12", when the slide changes. |
| Slide show | A modal dialog "Slide show" with the slide text and the picture alt text of the current slide. A polite announcement gives the position, "Slide 3 of 12", at each slide. When you type a number, a status message says "Go to slide 5". |
Color modes and motion
- Color modes. Set
colorModetolight,dark, orsystem.systemfollows the operating system and updates when it changes. Only the chrome changes. The slide always shows the colors of the file. See Appearance. - Reduced motion. When the operating system asks for reduced motion, the editor stops the loading spinner, the tooltip animation, the press effect of buttons, the slide-in of notices, and the transition of the slide show control bar.
- Forced colors. In a forced colors (high contrast) mode, the chrome uses the system colors. Selection, pressed and checked controls, focus rings, and disabled controls stay visible. The slide keeps the colors of the file. See Appearance.
- Slide show motion. The slide show does not play the animations and transitions of the file. They stay in the file on save. The Animations tab of the side panel lists the effects of a slide as text, in play order.
Known limits
These limits apply:
- Alt text of other objects. Only pictures give their alt text to a screen reader on the slide. Charts, groups, and shapes do not. A picture with a title but no alt text is hidden.
- Text input value. While you edit text, the text input holds only the paragraph text up to the caret, at most about 200 characters. A screen reader does not read the text after the caret from the input.
- Slide content structure. The slide is drawn as SVG. A screen reader gets the slide text only as flat text, in z-order. It gets no headings, lists, or reading order. It gets the shape name only when a shape is selected. When more than one shape is selected, it hears no announcement.
Next steps
- Installation: requirements, styles, and how to embed the editor.
- Customization: build controls that keep labels and keyboard support.
- Language: translate the interface and its accessible names.