fix(#4382): [Accessibility] TableView: Screen Readers do not work in Firefox#6465
Conversation
…Firefox
At present, we do not support sections in TableView; The rendered content within the ScrollView is {state.visibleViews[1]}, just the table body content.
I think we can fix #4382, by using role="presentation" for the TableRowGroup returned by the renderWrapper method at https://github.com/adobe/react-spectrum/blob/f1d3a8d353c4b5a41a463b08b19d69e5f7e1a1d8/packages/%40react-spectrum/table/src/TableViewBase.tsx#L294, and and then replacing role="presentation" on the ScrollView at https://github.com/adobe/react-spectrum/blob/f1d3a8d353c4b5a41a463b08b19d69e5f7e1a1d8/packages/%40react-spectrum/table/src/TableViewBase.tsx#L620 with role="rowgroup" at https://github.com/adobe/react-spectrum/blob/f1d3a8d353c4b5a41a463b08b19d69e5f7e1a1d8/packages/%40react-spectrum/table/src/TableViewBase.tsx#L638.
|
## API Changes
unknown top level export { type: 'any' } |
At present, we do not support sections in TableView; the rendered content within the ScrollView is {state.visibleViews[1]}, just the table body content. I think we can fix #4382, by using role="presentation" for the TableRowGroup returned by the renderWrapper method at
react-spectrum/packages/@react-spectrum/table/src/TableViewBase.tsx
Line 294 in f1d3a8d
react-spectrum/packages/@react-spectrum/table/src/TableViewBase.tsx
Line 620 in f1d3a8d
react-spectrum/packages/@react-spectrum/table/src/TableViewBase.tsx
Line 638 in f1d3a8d
Closes #4382
✅ Pull Request Checklist:
📝 Test Instructions:
overflow: autoandrole="rowgroup"hastabIndex={-1}, yet each table contains focusable content.Contrast this with the previous behavior:
overflow: autohas bothrole="presentation"andtabIndex={-1}. Browsers interpret the scrollable element as an additional generic element in the accessibility tree, which breaks the expected table structure in WAI-ARIA.🧢 Your Project:
Adobe/Accessibility