Incomplete useGridList WAI/ARIA pattern? #4371
-
Im trying to use the useGridList hook to standardize search results across my app. These items have titles, descriptions, some with data-lists and actions, etc. Accoding to WAI/ARIA, specifically Example 3: Scrollable Search Results on that page, shows this pattern should be able to accommodate multiple focusable grid cells within a grid row. I think this is the closest hook react-aria provides that would provide accessibility for what is essentially arbitrarily detailed product-card search results, however from what i can see the docs don't show how to use multiple focusable grid cells within a grid row. Is this possible? Cheers folks. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
useGridList is basically a way to have a list with interactive children (so an alternative to list box, which doesn't allow interactive children). It uses the grid pattern to achieve this, where each row has one grid cell with all it's contents inside. Interactive children within the row can be navigated with left/right arrow keys. It sounds like that's exactly what you need. Each interactive child doesn't necessarily need it's own grid cell to achieve what you're describing. |
Beta Was this translation helpful? Give feedback.
You could achieve that if you wanted using the grid hooks themselves, although we don't have docs for them. You can see this basically being done in the table hooks, if you have a cell with just a link inside, the link will be focused instead of the cell. That might be a solution, or you could just have your gridlist row action trigger the link.