Skip to content

🎨 Palette: [UX improvement] Add context to generic text buttons#191

Open
aicoder2009 wants to merge 1 commit into
mainfrom
palette-aria-labels-generic-buttons-13844653177100647895
Open

🎨 Palette: [UX improvement] Add context to generic text buttons#191
aicoder2009 wants to merge 1 commit into
mainfrom
palette-aria-labels-generic-buttons-13844653177100647895

Conversation

@aicoder2009

@aicoder2009 aicoder2009 commented Jun 26, 2026

Copy link
Copy Markdown
Owner

💡 What

Added dynamic, contextual aria-label attributes to generic visual text buttons like [edit], [delete], [share], [clear], and [remove] within the SortableCitation component.

🎯 Why

When components are repeated in a list (like citations), screen readers read generic text like "edit, button" without surrounding visual context. Users using assistive technologies don't know what they are editing or deleting.

📸 Before/After

Before: Screen reader announces: "edit, button", "delete, button", "remove, button".
After: Screen reader announces: "Edit Introduction to Physics, button", "Delete Introduction to Physics, button", "Remove quote 1, button".

♿ Accessibility

This directly improves screen reader navigation by ensuring all interactive elements provide unambiguous, specific context for the action they perform, adhering to WCAG guidelines for link/button purpose.


PR created automatically by Jules for task 13844653177100647895 started by @aicoder2009

Summary by CodeRabbit

  • Bug Fixes
    • Improved accessibility labels for several citation actions, including edit, share, delete, notes, quotes, and remove quote controls.
    • Action buttons in repeated or dynamic item lists now use more specific labels, making them easier to understand with assistive technologies.

Added specific aria-labels based on citation titles to generic text buttons (e.g., [edit], [delete], [share]) in the SortableCitation component to provide essential context for screen reader users. Updated the palette journal with this learning.

Co-authored-by: aicoder2009 <127642633+aicoder2009@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
opencitation Ready Ready Preview, Comment Jun 26, 2026 11:24am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds an accessibility guideline for contextual action labels and updates citation-related buttons to use item-specific aria-label text derived from the citation title or quote index.

Changes

Contextual citation action labels

Layer / File(s) Summary
Guideline and citation labels
\.jules/palette.md, src/components/wiki/sortable-citation.tsx
Adds a guideline for contextual aria-label values on repeated list-item actions and applies title- or quote-index-based labels to citation edit/share/delete, notes edit/clear, quote remove, and quote edit buttons.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~4 minutes

Poem

A bunny hopped through labels neat,
With titles making buttons sweet.
Edit, share, and notes now glow,
Quote actions tell us what they शो?
Hop-hop—accessibility keeps the beat.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is clearly related to the PR’s accessibility update for contextual button labels, though it is a bit broad.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette-aria-labels-generic-buttons-13844653177100647895

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
src/components/wiki/sortable-citation.tsx (1)

355-694: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add contextual aria-label to remaining generic text buttons for consistency.

The new guideline and this PR correctly label [edit], [delete], [share], [clear], and [remove] buttons. Several other generic text buttons in the same repeated list context were missed and should also receive item-specific labels for a complete accessible experience:

  • [copy] / [copy in-text] (lines 355–382)
  • [+ add notes] (lines 471–480)
  • [+ add quote] / + add quote (lines 530–537, 591–599)
  • [+ add tag], [add], [cancel] (lines 644–694)

Consider following the same `Action ${citation.fields?.title || "this citation"}` pattern so screen reader users hear consistent context across all actions.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/wiki/sortable-citation.tsx` around lines 355 - 694, The
remaining generic text buttons in sortable-citation should also get
item-specific aria-labels for consistency and accessibility. Update the
copy/add/cancel controls in the same citation actions block, notes/quotes
sections, and tags editor so their labels include the citation context using the
existing citation.fields?.title or “this citation” pattern, matching the
already-labeled edit/delete/share/clear/remove buttons. Focus on the button
elements for copy, copy in-text, add notes, add quote, add tag, add, and cancel.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In `@src/components/wiki/sortable-citation.tsx`:
- Around line 355-694: The remaining generic text buttons in sortable-citation
should also get item-specific aria-labels for consistency and accessibility.
Update the copy/add/cancel controls in the same citation actions block,
notes/quotes sections, and tags editor so their labels include the citation
context using the existing citation.fields?.title or “this citation” pattern,
matching the already-labeled edit/delete/share/clear/remove buttons. Focus on
the button elements for copy, copy in-text, add notes, add quote, add tag, add,
and cancel.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: e0521320-27dc-4128-81cc-d91334cae9dd

📥 Commits

Reviewing files that changed from the base of the PR and between b69285b and 7287aaf.

📒 Files selected for processing (2)
  • .jules/palette.md
  • src/components/wiki/sortable-citation.tsx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant