- Spreadsheet docs
- Developers
Accessibility for developers
What an embedded 8sheets workbook does for screen reader and keyboard users, and what your page should add.
The grid is drawn on a canvas, which assistive technology can't read by itself. 8sheets makes up for it: it announces the active cell, selections and objects through live regions that VoiceOver, NVDA and JAWS read, it is fully usable from the keyboard, and it follows the system's contrast and motion settings. The user-side details are on Accessibility. This page covers what you control when you embed it.
Label the workbook and its cells
JavaScript
import { mountWorkbook } from '@8sheets/core';
// <section aria-labelledby="budget-title"><h2 id="budget-title">Team budget</h2><div id="sheet"></div></section>
const wb = await mountWorkbook(document.querySelector('#sheet'), { fileName: 'Team budget' });
const sheet = wb.activeSheet;
sheet.range('F2:F13').altText = 'Trend for {value}'; // read instead of the shown text
sheet.range('A1').values = [['Team budget, 2027']];
sheet.range('A1').style = { bold: true, fontSize: 16 };React
import { Sheet } from '@8sheets/react';
export function TeamBudget() {
return (
<section aria-labelledby="budget-title">
<h2 id="budget-title">Team budget</h2>
<div style={{ height: 520 }}>
<Sheet
options={{ fileName: 'Team budget' }}
onReady={(wb) => { wb.activeSheet.range('F2:F13').altText = 'Trend for {value}'; }}
/>
</div>
</section>
);
}Vue
<script setup>
import { Sheet } from '@8sheets/vue';
function label(wb) {
wb.activeSheet.range('F2:F13').altText = 'Trend for {value}';
}
</script>
<template>
<section aria-labelledby="budget-title">
<h2 id="budget-title">Team budget</h2>
<Sheet :options="{ fileName: 'Team budget' }" style="height: 520px" @ready="label" />
</section>
</template>Angular
import { Component } from '@angular/core';
import { SheetComponent, SheetsWorkbook } from '@8sheets/angular';
@Component({
selector: 'app-team-budget',
imports: [SheetComponent],
template: `
<section aria-labelledby="budget-title">
<h2 id="budget-title">Team budget</h2>
<eight-sheet class="grid" [options]="{ fileName: 'Team budget' }" (ready)="label($event)" />
</section>
`,
styles: `.grid { height: 520px; }`,
})
export class TeamBudget {
label(wb: SheetsWorkbook) {
wb.activeSheet.range('F2:F13').altText = 'Trend for {value}';
}
}- Put the workbook in a labelled region of your page, as above, so users can find it among your page's landmarks. Inside, the ribbon, the grid, the sheet tabs and the task pane carry labels of their own, and the name box, formula bar and cell editor are labelled fields.
- Alternative text for cells.
range.altTextsets what a screen reader says for a cell instead of its shown text, with{value}standing for that text;''ornullremoves it. Users set the same thing under Cell Alt Text in a cell's context menu. - Charts, pictures and shapes announce their name, kind, title and alternative text when selected, so give them names and alternative text in workbooks you ship.
- Sheet names are announced; name sheets for what they hold rather than leaving
Sheet1.
What the workbook announces
As the active cell moves, 8sheets announces its address, the value shown or its alternative text, a formula, a link, a note or comment, a dropdown list, an input message, a merged range, the table column, and whether the cell is locked. Selections announce their range and size. The accessibility: false option stops these announcements, for a page that provides its own.
Keyboard
- Every command is reachable from the keyboard. F6 and Shift+F6 move between the ribbon, the formula bar, the grid, task panes, the sheet tabs and the status bar.
- Tapping Alt (Opt) or pressing F10 shows KeyTips for the ribbon.
- Menus, dialogs and galleries follow the usual arrow, Tab, Return and Esc conventions, and focus returns where it came from.
When you add your own keys with wb.commands.bindKey, they take priority over the grid's own use of that key: don't take keys users rely on to move, such as arrows, Tab and F6. Ribbon buttons you add use their label as the accessible name and tooltip, so give each a clear label even when it has an icon.
Keyboard and clipboard input goes to the workbook last clicked or focused.
Seeing the screen
- The chrome follows the system's request for more contrast, and forced colours with a grid theme taken from the system palette, and drops animations when reduced motion is asked for.
chrome: 'auto'follows the system's light or dark mode. If you set your own skin, check its text and line colours for contrast.- Zoom goes from 10% to 400% (the
userZoomoption allows the pinch gesture and the slider), andtouchLayout: truegives larger touch targets. focusHighlightshades the row and column of the active cell, which helps people who lose track of the cursor.
The accessibility checker
Review > Check Accessibility finds missing alternative text, tables without a header row, hard-to-read text contrast, merged cells, unclear link text, default sheet names and blank rows in tables, and offers a fix for each. Point your users to it when they build workbooks others will read.