🎨 Palette: Add contextual ARIA labels to citation action buttons#204
🎨 Palette: Add contextual ARIA labels to citation action buttons#204aicoder2009 wants to merge 1 commit into
Conversation
Adds descriptive `aria-label` attributes to the inline action buttons within the `SortableCitation` component (e.g., "[edit]", "[delete]", "[clear]") to provide specific context for screen reader users. Co-authored-by: aicoder2009 <127642633+aicoder2009@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. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
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 change adds ChangesAccessibility Labels for Citation Actions
Estimated code review effort: 1 (Trivial) | ~3 minutes Related PRs: None identified. Suggested labels: accessibility, frontend Suggested reviewers: None identified. 🐰 Thirteen little labels, hopping into place, 🚥 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 |
There was a problem hiding this comment.
Pull request overview
This PR improves the accessibility of SortableCitation by adding contextual aria-label attributes to otherwise terse, bracket-style action buttons so screen readers can announce clearer button purposes within a citation.
Changes:
- Added descriptive
aria-labelvalues to citation-level actions (copy, copy in-text, edit, share, delete). - Added contextual
aria-labelvalues to notes and quotes actions (edit/clear/add notes, remove/add/edit quotes). - Added contextual
aria-labelvalues to tag actions (add/cancel/add suggested tags).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <button | ||
| onClick={() => onShare(citation.id)} | ||
| className="text-wiki-link text-sm hover:underline focus-visible:outline-dotted focus-visible:outline-1 focus-visible:outline-wiki-text" | ||
| aria-label="Share citation" | ||
| > |
What:
Added descriptive
aria-labelattributes to the various text-based action buttons in theSortableCitationcomponent. This includes buttons like "[edit]", "[delete]", "[copy]", "[+ add notes]", and "[clear]".Why:
The application uses very terse, generic text for its inline buttons (like "[edit]" and "[delete]"). Without visual context, screen reader users hear these buttons without knowing what they apply to, especially since there are multiple "edit" or "add" buttons within a single citation view for different fields (notes, quotes, tags, etc.).
Before/After:
Accessibility:
This PR directly addresses the accessibility pattern of ambiguous action buttons by providing explicitly scoped
aria-labels for the generic visual text buttons, satisfying WCAG criteria for link and button purpose context.PR created automatically by Jules for task 5468680632158276255 started by @aicoder2009
Summary by CodeRabbit