Commit fdd87db
authored
fix: add keyboard accessibility to Heatmap cells (JhaSourav07#2216)
## Description
Closes JhaSourav07#354
Adds proper ARIA grid semantics to the Heatmap component for full
keyboard accessibility.
**Changes made:**
- Added `role="grid"` to outer flex container
- Added `role="row"` to each week column
- Added `role="gridcell"` to each day cell
**Already present (no changes needed):**
- `tabIndex={0}` — cells are keyboard focusable
- `onFocus` → show tooltip
- `onBlur` → hide tooltip
- `aria-label` with contribution count and date
- `focus:ring-2` for visible focus indicator
**Why role="grid" pattern?**
`role="gridcell"` alone is insufficient — ARIA spec requires
gridcell to be inside a row, and row inside a grid.
This makes the heatmap fully accessible to screen readers.
## Pillar
♿ Accessibility
## Checklist
- [x] My code follows the project's coding standards
- [x] I have run `npm run format` and `npm run lint`
- [x] CI Pipeline passing ✅
- [x] No regressions in existing functionality
- [x] Closes JhaSourav07#3541 file changed
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
131 | | - | |
| 131 | + | |
132 | 132 | | |
133 | | - | |
| 133 | + | |
134 | 134 | | |
135 | 135 | | |
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| |||
0 commit comments