You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: packages/main/src/components/AnalyticalTable/docs/AnalyticalTable.mdx
+16Lines changed: 16 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -549,6 +549,22 @@ function ContextMenuExample() {
549
549
550
550
</details>
551
551
552
+
## Accessibility
553
+
554
+
This example demonstrates possible accessibility configuration for the `AnalyticalTable`:
555
+
556
+
-**`accessibleName`**: Sets a concise `aria-label` on the table grid, giving screen readers a meaningful table name.
557
+
-**`accessibleNameRef`**: References the ID of an external labelling element via `aria-labelledby`. When either `accessibleName` or `accessibleNameRef` is set, the automatic connection to the `header` prop is removed.
558
+
-**`headerLabel`** (column option): Provides a screen-reader-accessible label for column headers that have no textual content.
559
+
-**`cellLabel`** (column option): Returns a descriptive `aria-label` for cells whose visual content is not self-explanatory.
560
+
561
+
**Note:**
562
+
563
+
- The example also includes the [useAnnounceEmptyCells](?path=/docs/data-display-analyticaltable-plugin-hooks--docs#announce-empty-cells) plugin hook, which adds explicit empty-cell announcements for screen readers that do not detect them on their own. As this could lead to duplicate screen reader announcement, use with caution.
564
+
- When the `header` prop is set, its text is automatically used as the table's accessible name. To provide a different accessible name, use `accessibleName` or `accessibleNameRef` instead.
565
+
566
+
<Canvasof={ComponentStories.Accessibility}/>
567
+
552
568
## Kitchen Sink
553
569
554
570
A comprehensive example combining many AnalyticalTable features: sorting, filtering, grouping, custom cells, row and navigation highlighting, infinite scrolling, column reordering, vertical alignment, `scaleWidthModeOptions` for custom renderers, `retainColumnWidth`, `sortDescFirst`, and more.
* Component or text rendered in the header section of the `AnalyticalTable`.
768
768
*
769
-
* __Note:__ If not set, it will be hidden.
769
+
* __Note:__ If not set, the header section is not rendered. When set, its text is automatically used as the table's accessible name. To provide a different accessible name, use `accessibleName` or `accessibleNameRef` instead.
770
770
*/
771
771
header?: ReactNode;
772
+
/**
773
+
* Defines the accessible name of the table.
774
+
*
775
+
* __Note:__ If set, the `aria-labelledby` derived from the `header` prop will not be applied to the table grid.
776
+
*/
777
+
accessibleName?: string;
778
+
/**
779
+
* Defines the IDs of the elements that label the table.
780
+
*
781
+
* __Note:__ If set, the `aria-labelledby` derived from the `header` prop will not be applied to the table grid.
782
+
*/
783
+
accessibleNameRef?: string;
772
784
/**
773
785
* Extension section of the Table. If not set, no extension area will be rendered
0 commit comments