Add ARIA landmark roles for screen reader navigation - #396
Merged
Conversation
Wraps the top navigation in a header/banner landmark, marks nav bars with role="navigation", wraps primary content in <main>, and gives the Help page's sidebar an explicit complementary role/label so assistive tech can jump between page regions.
|
@wandooadzer-cmyk Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wraps the top navigation in a header/banner landmark, marks nav bars with role="navigation", wraps primary content in
, and gives the Help page's sidebar an explicit complementary role/label so assistive tech can jump between page regions.Body:
Summary
role="banner"around the top nav (App.jsx) and mark all nav bars withrole="navigation"so assistivetech can distinguish site chrome from content.
<main>on the landing page,/help, and/ranking, replacing plain<div>wrappers./helpsidebar an explicitrole="complementary"/aria-label="Request panel"so it reads as adistinct landmark from the map.
Addresses the missing ARIA landmark roles (banner, main, navigation, contentinfo) called out in the accessibility
issue — structural navigation via landmarks was previously unavailable to screen reader users.
Test plan
npm run buildsucceedsnpx vitest run test/a11y-components.test.jsx test/ranking.test.jsx test/sidebar-class.test.js test/sanity.test.jsxpass/,/help,/rankingNote: the pre-commit hook (Prettier via lint-staged) reformatted the two touched files that weren't previously
Prettier-clean (
App.jsx,Ranking.jsx), so the diff includes unrelated whitespace/quote-style changes alongsidethe landmark edits.
Closes #94
Closes #97
Closes #96
Closes #95