Skip to content

Latest commit

 

History

History
26 lines (14 loc) · 716 Bytes

datatable-aria-describedby.md

File metadata and controls

26 lines (14 loc) · 716 Bytes

Rule to enforce aria-describedby on DataTable (datatable-aria-describedby)

DataTable requires aria-describedby prop that aligns with an id on a text element. This property allows screen readers to provide better context about the data of a DataTable.

Rule Details

This rule aims to provide an accessible DataTable experience for screen reader users.

Examples of incorrect code for this rule:

<Heading>Users</Heading>
<DataTable columns={columns} data={data} />

Examples of correct code for this rule:

<Heading id="user-table-heading">Users</Heading>
<DataTable aria-describedby="user-table-heading" columns={columns} data={data} />