Interface AriaTextsIf

The texts the table speaks to screen reader users: announcements of the live region (sorting, filter, copy, select all) and the accessible names of controls the table renders (row checkboxes, header group toggles).

The defaults are English (AriaTexts). Override single functions – e.g. for another language – with TableOptionsIf.ariaTexts; the others keep their default.

Every function returns plain text. It is written with textContent / setAttribute, never as HTML, so data in it (column labels, group labels) needs no escaping.

Example

const tableOptions: TableOptionsIf = {
...new TableOptions(),
ariaTexts: {
filtered: (rowCount: number) => `${rowCount} Zeilen`,
sorted: (column: string, state: SortState) => state ? `Sortiert nach ${column}` : `Sortierung entfernt`,
},
};

Since

1.1.91

See

Training: Accessible tables: keyboard and screen readers

Hierarchy

  • AriaTextsIf

Implemented by

Methods

  • Announced after Delete/Backspace cleared cells.

    Parameters

    • cellCount: number

      the number of cleared cells

    Returns string

    default: "8 cells cleared"

    Since

    1.1.99

  • Announced after a fill (fill handle, Ctrl/⌘+D, Ctrl/⌘+R) – optional, AriaTexts has a default.

    Parameters

    • cellCount: number

      the number of filled cells

    Returns string

    default: "3 cells filled"

    Since

    1.1.96

  • Announced after Ctrl/⌘+V (copy, cut and paste, tableOptions.clipboard).

    Parameters

    • cellCount: number

      the number of pasted cells

    • skippedCount: number

      cells left out (read only, invalid, cut off at the last column)

    Returns string

    default: "6 cells pasted", "4 cells pasted, 2 skipped"

    Since

    1.1.99

  • Announced when more cells should be cleared than EditingOptionsIf.maxClearCells allows.

    Parameters

    • maxCells: number

      the limit

    Returns string

    default: "Too many cells to clear (at most 1000000)"

    Since

    1.1.99

  • The accessible name of the toggle button of an expanded header group.

    Parameters

    • groupLabel: string

      the label of the group

    Returns string

    default: "Collapse group Q1"

  • Announced after Ctrl+Space selected the columns of the active cell.

    Parameters

    • columnCount: number

      number of selected columns

    Returns string

    default: "Column selected"

    Since

    1.1.99

  • Announced after columns were deleted (TableApi.deleteColumns).

    Parameters

    • count: number

      the columns

    Returns string

    default: "2 columns deleted"

    Since

    1.1.99

  • Announced after columns were inserted (TableApi.insertColumns).

    Parameters

    • count: number

      the columns

    Returns string

    default: "2 columns inserted"

    Since

    1.1.99

  • Announced when several ranges are selected and only the last one is copied (like Google Sheets).

    Returns string

    default: "Only the last selected range was copied"

    Since

    1.1.99

  • Announced when more cells should be copied than CopyService.maxCopyCells allows.

    Parameters

    • maxCells: number

      the limit

    Returns string

    default: "Too many cells to copy (at most 1000000)"

    Since

    1.1.99

  • Announced after Ctrl/⌘+X: the cells are marked and move on the next paste.

    Parameters

    • cellCount: number

      the number of cut cells

    Returns string

    default: "6 cells cut, paste to move them"

    Since

    1.1.99

  • Announced when the cell editor opens (Excel-style editing).

    Parameters

    • columnLabel: string

      the column label

    Returns string

    default: "Editing Price"

    Since

    1.1.99

  • The accessible name of the toggle button of a collapsed header group.

    Parameters

    • groupLabel: string

      the label of the group

    Returns string

    default: "Expand group Q1"

  • Announced when a cell formula with a syntax error is stored (it shows #ERROR!, tableOptions.cellFormulas).

    Parameters

    • message: string

      the parser's message

    Returns string

    default: "Formula error: <message>"

    Since

    1.1.99

  • The label of the list of function suggestions while a cell formula is typed.

    Returns string

    default: "Functions"

    Since

    1.1.99

  • The description of the grid with Excel-style editing (aria-description of the host): how it is used.

    Returns string

    default: "Type to edit a cell, Enter to edit or commit, Escape to cancel. Tab in the last column leaves the table."

    Since

    1.1.99

  • Announced when an edited value is invalid (ColumnDefIf.validate) and not written (without batch edit).

    Parameters

    • message: string

      the message of the validator

    Returns string

    default: "Invalid value: <message>"

    Since

    1.1.96

  • Announced when more cells should be pasted than ClipboardOptionsIf.maxPasteCells allows.

    Parameters

    • maxCells: number

      the limit

    Returns string

    default: "Too many cells to paste (at most 1000000)"

    Since

    1.1.99

  • Announced after a value was marked in a batch edit (or set back).

    Parameters

    • pendingCount: number

      the number of pending cells

    Returns string

    default: "3 changes not saved", "No unsaved changes"

    Since

    1.1.96

  • Announced when Shift+arrows change the selected range (the focus stays on the active cell).

    Parameters

    • rowCount: number

      rows of the range

    • columnCount: number

      shown columns of the range

    Returns string

    default: "3 rows, 2 columns selected"

    Since

    1.1.99

  • Announced when a key is typed on a cell that cannot be edited (Excel-style editing).

    Returns string

    default: "Read only"

    Since

    1.1.99

  • Announced after Ctrl+Y / Ctrl/⌘+Shift+Z.

    Parameters

    • label: string

      the step

    • cellCount: number

      cells written again

    Returns string

    default: "Redo Paste, 6 cells"

    Since

    1.1.99

  • Announced when a reference is inserted by pointing (arrow keys or a click while typing a formula).

    Parameters

    • reference: string

      e.g. "B2" or "B2:B4"

    Returns string

    default: the reference

    Since

    1.1.99

  • Announced when a row drag starts (optional – AriaTexts has a default).

    Parameters

    • rowCount: number

      number of dragged rows

    Returns string

    default: "Dragging 1 row. Press Escape to cancel."

    Since

    1.1.95

  • Announced when rows cannot be moved: the table is sorted or filtered (managed row drag), or the row cannot move further (optional – AriaTexts has a default).

    Returns string

    default: "Rows cannot be moved while the table is sorted or filtered"

    Since

    1.1.95

  • Announced after rows were moved by drag and drop or Ctrl+Alt+↑/↓ (optional – AriaTexts has a default).

    Parameters

    • position: number

      1-based position of the first moved row

    • rowCount: number

      number of displayed rows

    Returns string

    default: "Row moved to position 7 of 20"

    Since

    1.1.95

  • Announced after Shift+Space selected the rows of the active cell.

    Parameters

    • rowCount: number

      number of selected rows

    Returns string

    default: "Row selected"

    Since

    1.1.99

  • Announced after rows were deleted (TableApi.deleteRows).

    Parameters

    • count: number

      the rows

    Returns string

    default: "3 rows deleted"

    Since

    1.1.99

  • Announced after rows were inserted (TableApi.insertRows).

    Parameters

    • count: number

      the rows

    Returns string

    default: "3 rows inserted"

    Since

    1.1.99

  • The accessible name of the checkbox of a body row.

    Parameters

    • rowNumber: number

      1-based number of the row in the body

    Returns string

    default: "Select row 5"

  • Announced after the selection was cleared by the keyboard (e.g. Ctrl+Shift+A).

    Returns string

    default: "Selection cleared"

  • Announced after a column was sorted (header double click, Enter on a header cell, TableApi.sortByColumn).

    Parameters

    • columnLabel: string

      the header label of the column

    • sortState: SortState

      the new sort state, "" = unsorted

    Returns string

    default: "Sorted by Total, descending", "Sorting of Total removed"

  • Announced when one change has more cells than UndoOptionsIf.maxCells: the history is emptied.

    Parameters

    • maxCells: number

      the limit

    Returns string

    default: "This change cannot be undone (more than 1000000 cells)"

    Since

    1.1.99

  • Added to the undo/redo announcement when cells were left out (changed meanwhile, row gone, read only).

    Parameters

    • cellCount: number

      cells left out

    Returns string

    default: "2 cells skipped"

    Since

    1.1.99

  • Announced after Ctrl/⌘+Z (undo and redo, tableOptions.undo).

    Parameters

    • label: string

      the step: "Edit", "Paste", "Fill" …

    • cellCount: number

      cells written back

    Returns string

    default: "Undo Paste, 6 cells"

    Since

    1.1.99