Closed majornista closed 3 months ago
The generic div container that wraps the virtualized elements and provides the content height for native scrolling should have role="presentation" so that it does not break the accessibility tree structure for the containing grid, menu or listbox.
div
role="presentation"
https://github.com/adobe/react-spectrum/blob/2cd8f0b509cd9a1d93322dd75fc1306e5f0e217f/packages/react-aria-components/src/Virtualizer.tsx#L65
The problem can be seen in the Virtualized RAC table at: https://reactspectrum.blob.core.windows.net/reactspectrum/ff19a7c1ca7fccfd3e46eeef1c6b71ef23f36437/storybook/index.html?path=/story/react-aria-components--virtualized-table&providerSwitcher-express=false
We may wish to return role="presentation" at: https://github.com/adobe/react-spectrum/blob/2cd8f0b509cd9a1d93322dd75fc1306e5f0e217f/packages/%40react-aria/virtualizer/src/ScrollView.tsx#L245-L247
The generic
div
container that wraps the virtualized elements and provides the content height for native scrolling should haverole="presentation"
so that it does not break the accessibility tree structure for the containing grid, menu or listbox.https://github.com/adobe/react-spectrum/blob/2cd8f0b509cd9a1d93322dd75fc1306e5f0e217f/packages/react-aria-components/src/Virtualizer.tsx#L65
The problem can be seen in the Virtualized RAC table at: https://reactspectrum.blob.core.windows.net/reactspectrum/ff19a7c1ca7fccfd3e46eeef1c6b71ef23f36437/storybook/index.html?path=/story/react-aria-components--virtualized-table&providerSwitcher-express=false
We may wish to return
role="presentation"
at: https://github.com/adobe/react-spectrum/blob/2cd8f0b509cd9a1d93322dd75fc1306e5f0e217f/packages/%40react-aria/virtualizer/src/ScrollView.tsx#L245-L247