fix: add ARIA roles to leaderboard divs for screen reader accessibility (#171)#184
fix: add ARIA roles to leaderboard divs for screen reader accessibility (#171)#1845hivam123 wants to merge 3 commits into
Conversation
|
Thank you for submitting a pull request. Please ensure your changes comply with the project's contribution guidelines and that all workflow checks pass successfully. Formatting and Branching
|
|
/format |
|
I have successfully run Prettier and pushed the formatting fixes to this PR. Note for Contributors: Because this commit was pushed by a bot, GitHub will not automatically re-run the CI checks. To trigger them to pass, you must either:
|
jagdish-15
left a comment
There was a problem hiding this comment.
The PR description mentions adding columnheader and rowgroup roles as well, but in the current diff I'm only seeing the row and cell role additions inside render.js
Description
Added proper ARIA roles to the leaderboard's div-based layout so screen readers can correctly interpret the grid structure. Since the leaderboard uses CSS Grid with
<div>elements instead of native<table>markup, explicit ARIA roles are required for accessibility compliance.Linked Issue
Fixes #171
Changes Made
role="row"to.leaderboard-headerrole="columnheader"to each header cell divrole="rowgroup"to#leaderboard-bodyrole="row"to each leaderboard row inrender.jsrole="cell"to each data cell inrender.jsType of Change
Testing
Checklist
npx prettier --write .before submittingfeature/*branch, not themainbranchScreenshots / Screen Recording
Verified using browser DevTools Accessibility Tree — leaderboard rows and headers are now correctly identified by screen readers.