Repository navigation
fix: make repository and organization cards keyboard accessible - #571
Open
wywxt wants to merge 1 commit into
github:main from
wywxt:fix/keyboard-accessible-issue-toggle
Open
Conversation
Copy link
Copy Markdown
Problem
The repository and organization cards can only be expanded with a mouse. The chevron is a decorative <span> inside a clickable <div>, so:
- keyboard users cannot reach or toggle the issue/details panels;
- assistive technology has no way to know whether a card is expanded;
- clicking the repository link also toggles the card because the click bubbles up to the wrapper.
Fix
- Replace the chevron with a real
<button> that exposes aria-expanded and aria-controls and has an accessible label.
- Give each expandable panel an
id and point aria-controls at it.
- Stop clicks on the repository/organization link from bubbling into the card toggle.
Mouse behaviour is unchanged: clicking anywhere on the card still expands it.
How to test
npm run dev
- Open http://localhost:3000
- Press Tab until the chevron next to a repository is focused (a focus ring is visible), then press Enter or Space. The issue list expands/collapses and
aria-expanded updates.
- Click the repository name. It opens GitHub without toggling the card.
- The same applies to the cards on http://localhost:3000/teams .
Checks
-
npm run lint
-
npx next build
Addresses WCAG 2.1.1 (Keyboard) and 4.1.2 (Name, Role, Value).
fix: make repository and organization cards keyboard accessible
c325ca1
The expandable cards could only be toggled with a mouse: the chevron was
a decorative span inside a clickable div, so keyboard and assistive
technology users could not open the issue/details panels.
Replace the chevron with a real button that exposes aria-expanded and
aria-controls, and stop clicks on the repository/organization link from
bubbling into the card toggle.
Co-Authored-By: Claude Code <noreply@anthropic.com>
This branch has not been deployed
No deployments
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
1 participant