🎨 Palette: Enhance accessibility in Achievements component#3
Conversation
This commit improves the accessibility of the Achievements component by:
1. Adding a descriptive aria-label to the progress badge (e.g., "2 out of 5 achievements unlocked").
2. Adding visually hidden status text ("Locked" or "Unlocked") to achievement titles.
These changes ensure that screen reader users can understand their overall progress and the status of individual achievements.
Refactored the component to store the unlocked count in a variable for better readability.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🎨 Palette: Enhance accessibility in Achievements component
💡 What
This change enhances the accessibility of the
Achievementscomponent. It adds a descriptivearia-labelto the badge that displays the ratio of unlocked achievements and includes visually hidden text to communicate whether each achievement is "Locked" or "Unlocked" to screen readers.🎯 Why
The previous implementation used a numeric ratio (e.g., "2 / 5") which lacks context for screen reader users. Additionally, the locked/unlocked state was primarily communicated through visual cues (icon changes and opacity), making it difficult for users with visual impairments to distinguish between them.
♿ Accessibility
aria-labelto the progress badge summarizing the achievement status.sr-onlyspans to achievement titles to explicitly state the locked/unlocked status.📸 Before/After
PR created automatically by Jules for task 4718718549041103021 started by @glsee