🎨 Palette: Improve accessibility of citation action buttons#215
🎨 Palette: Improve accessibility of citation action buttons#215aicoder2009 wants to merge 1 commit into
Conversation
Adds contextual and conditionally dynamic `aria-label` attributes to the generic visual text buttons (`[copy]`, `[copy in-text]`, `[edit]`, `[share]`, `[delete]`) in the `SortableCitation` component to provide unambiguous context for screen readers navigating lists. Co-authored-by: aicoder2009 <127642633+aicoder2009@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
👋 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. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThis PR adds and adjusts ChangesCitation button accessibility labels
Estimated code review effort: 1 (Trivial) | ~3 minutes Related PRs: None found. Suggested labels: accessibility, ui Suggested reviewers: None found. 🐰 A rabbit hops with labels bright, 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
💡 What
Added semantic
aria-labelattributes to the generic visual text buttons ([copy],[copy in-text],[edit],[share],[delete]) in theSortableCitationcomponent. The copy buttons specifically use dynamically conditionally updated labels that mirror their visual state changes (e.g., changing from "Copy full citation" to "Copied full citation").🎯 Why
While these text-based buttons technically have an accessible name (the text content of the button, e.g., "[copy]"), these names lack specific context when placed inside lists with numerous identical buttons across multiple citations. Screen reader users navigating via landmarks or form controls might encounter repetitive names like "copy", "edit", and "delete" without knowing what they are operating on. More descriptive context such as "Edit citation details" and "Copy full citation" drastically improves comprehension and ease of use.
📸 Before/After
Before: Screen reader would announce: "left bracket copy right bracket button", "left bracket edit right bracket button".
After: Screen reader announces: "Copy full citation button", "Edit citation details button", "Copied full citation button" (when activated).
♿ Accessibility
PR created automatically by Jules for task 2857833030940629427 started by @aicoder2009
Summary by CodeRabbit