adobe / adobe/spectrum-web-components
[Bug]: sp-grid needs some sort of semantic structure
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 262
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 68
Description
### Code of conduct
- [X] I agree to follow this project's code of conduct.
### Impacted component(s)
sp-grid
### Expected behavior
The grid component needs to create some sort of semantic structure to be comprehensible by assistive technologies.
We would typically recommend that it would be role="grid" with role="row" and role="gridcell" components beneath it. This will allow AT users to navigate the grid, get a count of the items and allow each cell to be encountered as a distinct unit.
Ideally this would have rows which match the visuals but we have generally accepted the semantics being a single column with all the rows containing a single cell. (https://react-spectrum.corp.adobe.com/components/GridView)
### Actual behavior
There is currently no semantic structure
### Screenshots
_No response_
### What browsers are you seeing the problem in?
Firefox, Chrome, Safari, Microsoft Edge
### How can we reproduce this issue?
1. Go to https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/grid--default
2. Open Dev Tools in Chrome
3. Click on the "Switch to Accessibility TreeView" button
4. Note that there is no grid structure present
### Sample code that illustrates the problem
_No response_
### Logs taken while reproducing problem
_No response_
Contributor guide
Research direction
The issue identifies sp-grid and its Storybook default example; start by reproducing the problem in Chrome DevTools' Accessibility TreeView. Done means the component exposes a comprehensible grid structure with grid, row, and gridcell semantics, including distinct cells and navigable item counts for assistive technologies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100