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 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

  • 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"

  • 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 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 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 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

  • 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"