Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: Fixing virtualized list example being skipped when tabbing forward #33276

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const useTextStyle = makeResetStyles({
});

const CountriesList = React.forwardRef<HTMLUListElement>((props: React.ComponentProps<typeof List>, ref) => (
<List aria-label="Countries" tabIndex={0} {...props} ref={ref} />
<List aria-label="Countries" data-tabster={undefined} tabIndex={0} {...props} ref={ref} />
));

export const VirtualizedList = () => {
Expand Down Expand Up @@ -241,7 +241,12 @@ VirtualizedList.parameters = {
'by using the `tabIndex={0}` property on the List.',
'',
'> ⚠️ _It is important to manually set `aria-setsize` and `aria-posinset` attributes on the list items, since_',
'_the virualization will only render the visible items. Relying on the DOM state for these attributes will not work._',
'_the virtualization will only render the visible items. Relying on the DOM state for these attributes will not work._',
'',
'> ⚠️ _There is a weird issue when using `react-window` with `tabster` where adding `tab-index={0}` to the `List` while',
'having a mover for arrow navigation causes the tab key to skip the list when moving forward, but not backwards.',
'Since we do not need to support arrow navigation with non-interactive list items, we can set `data-tabster={undefined}`',
'to prevent this issue._',
].join('\n'),
},
},
Expand Down
Loading