🎨 Palette: スニペットコピーボタンのアクセシビリティ(aria-label)改善#992
Conversation
Adds a descriptive aria-label to the snippet copy buttons in the badge snippet component. When multiple "Copy" buttons exist in a list for different formats (Markdown, HTML, shields.io), screen reader users need context to know which snippet they are copying. This incorporates the specific snippet's label into the aria-label while retaining the "Copy" text. Co-authored-by: is0692vs <135803462+is0692vs@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. 1 Skipped Deployment
|
Qodo reviews are paused for this user.Troubleshooting steps vary by plan Learn more → On a Teams plan? Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center? |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesSnippet Copy Button Accessibility
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
このリポジトリでは staging 先行フローを採用しています。PR のターゲットを |
There was a problem hiding this comment.
Code Review
This pull request documents a new learning entry regarding accessible names for snippet copy buttons in .Jules/palette.md and implements this practice in badge-snippet.tsx by adding a descriptive aria-label to the copy button. There are no review comments to address.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
💡 What: バッジスニペット(BadgeSnippet)コンポーネント内の各「Copy」ボタンに、対象のスニペット形式(Markdown, HTML, shields.io など)を示すコンテキストを含んだ
aria-labelを追加しました(例:aria-label="Copy Markdown")。🎯 Why: 複数の「Copy」ボタンが同じ画面上に並んでいる場合、視覚的には隣接するラベルで区別がついても、スクリーンリーダーのユーザーにとっては「Copy」としか読み上げられず、どの形式のスニペットをコピーしようとしているのか判別しづらいためです。
♿ Accessibility:
${snippet.label}を組み合わせることで、アクセシビリティを向上させています。PR created automatically by Jules for task 6764395585767536628 started by @is0692vs
Summary by CodeRabbit
Documentation
Bug Fixes
Greptile Summary
各 Copy ボタンに
aria-label={Copy ${snippet.label}}を追加し、スクリーンリーダーユーザーが複数のスニペット形式(Markdown / HTML / shields.io)を区別できるようにしたアクセシビリティ改善 PR です。badge-snippet.tsx: ボタンのaria-labelにsnippet.labelを組み込み、WCAG 2.5.3「Label in Name」に準拠した形で実装。.Jules/palette.md: 同一ページに並ぶアクションボタンへのコンテキスト付きaria-label付与ルールをチームの学習メモに追記。Confidence Score: 4/5
変更は Copy ボタンへの
aria-label追加のみで、既存のロジックや UI には影響しません。安全にマージできます。変更は1行の属性追加で副作用はなく正確ですが、
aria-labelの正しさを検証するテストが追従していないため、将来的なラベル変更時に回帰を見逃すリスクが残っています。チーム自身の学習メモにもテスト更新を義務付けるルールが記されており、その点だけ対応が漏れています。badge-snippet.test.tsxのcopies selected snippet via clipboardテストがquerySelector("button")による DOM 直接参照のままで、aria-labelの正しさを検証していません。Important Files Changed
aria-label={Copy ${snippet.label}}を各 Copy ボタンに追加。WCAG 2.5.3 準拠の正しい実装。aria-label付与ルールを学習メモに追加。Sequence Diagram
sequenceDiagram participant SR as スクリーンリーダー participant Btn as Copy ボタン(aria-label="Copy Markdown") participant CB as Clipboard API SR->>Btn: フォーカス・読み上げ Note over SR,Btn: "Copy Markdown" と読み上げ(改善後) SR->>Btn: クリック Btn->>CB: navigator.clipboard.writeText(snippet.value) CB-->>Btn: 成功 Btn-->>SR: toast "コピーしました"Reviews (1): Last reviewed commit: "feat(web): add context to badge snippet ..." | Re-trigger Greptile