π¨ Palette: Improve accessibility of icon-only buttons with ARIA labels#88
π¨ Palette: Improve accessibility of icon-only buttons with ARIA labels#88
Conversation
β¦uttons Co-authored-by: longestmt <1509654+longestmt@users.noreply.github.com>
|
π 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. |
π‘ What
Added missing
aria-labelattributes to various icon-only buttons throughout the app (modals, workout tracker, plans list) and addedaria-hidden="true"to their inner<svg>icons or decorative text.π― Why
Icon-only buttons rely entirely on visual cues. Without
aria-label, screen reader users hear generic text like "button" with no context of what the button actually does. Addingaria-hidden="true"to the inner SVG prevents screen readers from redundantly announcing complex DOM node trees inside the button, creating a cleaner and more direct audio experience.πΈ Before/After
Before:
<button class="btn btn-ghost btn-icon" title="History"><svg>...</svg></button>After:
<button class="btn btn-ghost btn-icon" title="History" aria-label="History"><svg aria-hidden="true">...</svg></button>βΏ Accessibility
Significantly improves screen reader accessibility and navigation clarity. Ensures screen readers clearly announce the purpose of critical interactive elements like "Close modal", "Swap exercise", "1RM Calculator", "Skip timer", and "Delete plan" without extra noise from inner SVGs. Fixed critical issue where
aria-hiddenapplied to a<button>created inaccessible "ghost tab stops".PR created automatically by Jules for task 4254287669325776007 started by @longestmt