a11y(reputation): full keyboard operability#696
Merged
mikewheeleer merged 1 commit intoJul 25, 2026
Conversation
Convert reputation level legend bands from static <ul>/<li> to keyboard-operable <div role="button"> elements with tabIndex, Enter/Space activation, visible focus styles, and aria-pressed for active state communication. Closes Talenttrust#623
|
@Praiz089017 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! 🚀 |
Contributor
|
well done @Praiz089017, this reads well. merging in 🌟 |
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.
Description
The Reputation Profile component's legend bands were static, non-interactive elements unreachable by keyboard. This PR makes every legend band fully keyboard-operable with a logical focus order, visible focus styles, and proper ARIA semantics.
Closes #623
Problem
<ul>/<li>structure prevented addingrole="button"without axe violationsSolution
Converted the legend from
<ul>/<li>to<div role="group">with<div role="button">bands. Each band now:tabIndex={0}onKeyDown(Space also callse.preventDefault())aria-pressed(true for active band)aria-label(e.g. "Trusted Partner level: 3.0 to 4.0")focus-visible:ring-2 focus-visible:ring-indigo-500 focus-visible:ring-offset-2Type of Change
Pre-flight Checklist
npm run lintpasses — 0 errorsnpm testpasses — 89/89 tests in ReputationProfile.test.tsxnpx tsc --noEmitpasses — 0 type errorsTest Results
Cross-suite validation
Files Changed
src/components/ReputationProfile.tsx<ul>with<div role="group" aria-labelledby="reputation-legend-title"><li>with<div>carryingtabIndex={0},role="button",aria-pressed,aria-label,onKeyDown, andfocus-visiblering stylessrc/components/ReputationProfile.test.tsxfireEventandgetReputationBandsimportsrole="group"structureAccessibility
role="button"+aria-pressedpattern communicates state to screen readersfocus-visible:ring-2patternEdge Cases Covered