Props table
ProA component's props as a table: name, type, default and description, for documentation. Not an M3 component (@windmorph/react-pro).
import { PropsTable } from '@windmorph/react-pro';Part of Windmorph Pro, paid components on the free core, not on sale yet. See the Pro guide for what it includes and to register interest.
Keyboard
| Key | Action |
|---|---|
| Tab | Moves to the table, which takes focus so it can be scrolled. |
| Arrow Left or Arrow Right | Scrolls a table wider than its space sideways. |
Screen reader
- Role
- A
regionaround a real<table>with a<caption>. Column headings arethwithscope="col", and each row starts with the prop name as athwithscope="row", so table navigation reads each cell with its column and its prop. - Accessible name
- The region and the table are both named by
caption, orlabels.caption("Properties"). The caption is visually hidden. - States announced
- A required prop is followed by the word "required" (
labels.required); the asterisk you see is hidden.
Focus
- The scroll region takes focus with Tab (WCAG 2.1.1), so a keyboard can scroll it. It shows the M3 focus indicator: a 3px
secondaryoutline 2px outside its border. - The table holds nothing else to focus.
Touch target
None. It has nothing to press; the region scrolls with a swipe.
Motion
None. Nothing in it moves.
What you need to do
- Give each table a
captionthat says whose props it lists ("Button props"), so regions on a page with several tables have different names. - Keep descriptions plain text, and pass
labelsto translate the headings and the word "required".