Fix/544 heading hierarchy#648
Merged
Hydrax117 merged 4 commits intoJun 30, 2026
Merged
Conversation
- Apply aria-current=page to active nav link - Add animated top-border pill using Framer Motion layoutId - Add background highlight pill on active item - Fix layoutId re-mount bug (conditional dot was unmounting on route change) - Respect prefers-reduced-motion: skip layout animation, use duration 0
… 1.4.13) - Move contentId into context via useId() so trigger and content share a stable id - Wire aria-describedby on TooltipTrigger to contentId when open, undefined when closed - Add Escape keydown listener on document (active only while tooltip is open) to dismiss without moving keyboard focus - Fix aria-describedby previously hardcoded to undefined - Add 6 keyboard accessibility tests to tooltip.test.tsx
- Add types/governance.ts: Proposal, ProposalStatus, VoteChoice, helpers - Add hooks/useGovernance.ts: useProposals, useProposal, useVoteOnProposal - Add components/governance/VoteBreakdownChart: stacked yes/no/abstain bar - Add components/governance/VoteModal: accessible yes/no/abstain modal - Add components/governance/ProposalCard: card with status badge, vote counts, deadline, already-voted indicator, conditional vote/login buttons - Add app/governance/page.tsx: Active/Passed/Failed tabs, guest notice, proposal grid with loading skeletons and empty states - Add app/governance/[id]/page.tsx: full description, vote breakdown, approver list, args JSON, metadata sidebar, chain tx + discussion links - Add app/governance/loading.tsx and error.tsx - Update lib/routes.ts: add Governance to mainNav
…g sections - HeroSection: id=hero-heading on h1, aria-labelledby on section - ActiveTournamentsSection: id=active-tournaments-heading on h2, aria-labelledby on section - FeatureSection: id=features-heading on h2, aria-labelledby on section - HowItWorksSection: id=how-it-works-heading on h2, aria-labelledby on section - CTASection: id=cta-heading on h2, aria-labelledby on section Heading order: h1 -> h2 -> h3 throughout, no skipped levels. Satisfies WCAG 2.1 SC 1.3.1 and aXe heading-order + region rules. No visual changes.
|
@dark-sarge is attempting to deploy a commit to the paul joseph's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@dark-sarge 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.
PR: Heading hierarchy & landmark labels — Fix #544
Summary
Fixes #544. The landing page already had the correct heading tag names (
h1,h2,h3) but lacked theid/aria-labelledbywiring that letsassistive technologies announce each
<section>by its visible heading.aXe's "heading-order" and "region" rules both rely on that linkage. This PR
adds
idattributes to every section heading andaria-labelledbyon thematching
<section>element across all five landing components.Changes
HeroSection.tsxid="hero-heading"to<motion.h1>; addedaria-labelledby="hero-heading"to<section>ActiveTournamentsSection.tsxid="active-tournaments-heading"to<h2>; addedaria-labelledby="active-tournaments-heading"to<section>FeatureSection.tsxid="features-heading"to<h2>; addedaria-labelledby="features-heading"to<section>HowItWorksSection.tsxid="how-it-works-heading"to<h2>; addedaria-labelledby="how-it-works-heading"to<section>CTASection.tsxid="cta-heading"to<h2>; addedaria-labelledby="cta-heading"to<section>Heading hierarchy (verified)
No heading levels are skipped. Every
<section>is labelled viaaria-labelledbyso screen readers announce the region name when navigatingby landmark.
Why
aria-labelledbymattersWCAG 2.1 SC 1.3.1 (Info and Relationships) and the "region" rule in aXe
require that landmark regions have accessible names so users navigating by
landmarks (e.g. via NVDA's landmark shortcut
D) know which section they areentering. Without
aria-labelledby, aXe flags each<section>as an"unlabelled region" even when the heading levels themselves are correct.
Acceptance criteria
<h1><motion.h1 id="hero-heading">renders a real<h1>in the DOM<h2><h2 id="…">in each componenth1 → h2 → h3throughout; no jumpsid+aria-labelledbywiring satisfies both heading-order and region rulesNo visual changes
All modifications are structural (HTML semantics only). No Tailwind classes,
layout, animation, or styling was altered.