🎨 Palette: キーボードフォーカス時の視認性向上#1102
Conversation
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? |
|
Warning Review limit reached
Next review available in: 43 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 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 のターゲットを |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Code Review
This pull request documents and implements focus-visible accessibility styles across interactive elements in the FeedButton and Header components, aligning with a new learning entry added to .Jules/palette.md. Feedback on the changes suggests refactoring the FeedButton component to safely merge external className props with the default styles rather than completely overwriting them, ensuring that critical accessibility styles are preserved.
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.
| export function FeedButton({ | ||
| url, | ||
| className = "rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800", | ||
| className = "rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 dark:border-gray-700 dark:hover:bg-gray-800 dark:focus-visible:ring-gray-100 dark:focus-visible:ring-offset-gray-950", | ||
| label = "📡 Feed", | ||
| ariaLabel, | ||
| }: FeedButtonProps) { |
There was a problem hiding this comment.
改善の提案 (Maintainability)
FeedButton コンポーネントに外部から className プロップが渡された場合、デフォルトのスタイル(今回追加された focus-visible などの重要なアクセシビリティスタイルを含む)が完全に上書きされてしまいます。
外部からのカスタムクラスを適用しつつ、デフォルトのスタイルも維持できるように、クラス名をマージする実装に改善することを推奨します。
| export function FeedButton({ | |
| url, | |
| className = "rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 dark:border-gray-700 dark:hover:bg-gray-800", | |
| className = "rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 dark:border-gray-700 dark:hover:bg-gray-800 dark:focus-visible:ring-gray-100 dark:focus-visible:ring-offset-gray-950", | |
| label = "📡 Feed", | |
| ariaLabel, | |
| }: FeedButtonProps) { | |
| export function FeedButton({ | |
| url, | |
| className: customClassName, | |
| label = "📡 Feed", | |
| ariaLabel, | |
| }: FeedButtonProps) { | |
| const defaultClassName = "rounded-md border border-gray-300 px-3 py-1.5 text-sm hover:bg-gray-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 dark:border-gray-700 dark:hover:bg-gray-800 dark:focus-visible:ring-gray-100 dark:focus-visible:ring-offset-gray-950"; | |
| const className = customClassName ? defaultClassName + " " + customClassName : defaultClassName; |
💡 What: ヘッダーやフィードボタンの各種ボタン・リンクに
focus-visibleクラスを追加し、キーボード操作時のフォーカスインジケーターを明確にしました。🎯 Why: キーボードユーザーが現在どこにフォーカスが当たっているかを視覚的に把握しやすくするため。
📸 Before/After: N/A
♿ Accessibility: キーボードナビゲーション時の視認性が向上しました。
PR created automatically by Jules for task 14607321236183531301 started by @is0692vs
Greptile Summary
ヘッダーとフィードボタンのインタラクティブ要素(ナビリンク・ログアウト/ログインボタン・コピーボタン・開くリンク・textarea)に
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2とダークモード対応クラスを追加し、キーボードナビゲーション時のフォーカスインジケーターを改善するPRです。header.tsx: ナビリンク・ログアウトボタン・ログインボタンの3箇所に focus-visible クラスを追加。ただし「OpenShelf」ロゴリンクが未対応のまま残っています。feed-button.tsx: トリガーボタン(デフォルト className)・dialog内の textarea・コピーボタン・開くリンクの4箇所に一貫して focus-visible クラスを追加。こちらは網羅的に対応されています。.Jules/palette.md: 今回採用したフォーカスリングパターンをチームの学習ログとして記録。Confidence Score: 4/5
アクセシビリティ向上のための小規模なスタイル追加のみで、機能ロジックへの変更はなくマージしても安全です。
「OpenShelf」ロゴリンクへの対応漏れとアクティブ状態でのフォーカスリングコントラスト問題があり、PRの目的(すべてのインタラクティブ要素への対応)が完全には達成されていません。ただし既存の動作を壊す変更はなく、アクセシビリティは全体的に向上しています。
apps/web/src/components/header.tsx — ロゴリンクへの対応漏れとアクティブリンクのコントラストについて確認が必要です。
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A[キーボード操作 Tab キー] --> B{フォーカス対象} B --> C[Header: OpenShelfロゴリンク] B --> D[Header: ナビリンク] B --> E[Header: ログアウトボタン] B --> F[Header: ログインボタン] B --> G[FeedButton: トリガーボタン] C -->|❌ focus-visible 未対応| C1[フォーカスリング非表示] D -->|✅ focus-visible 追加| D1[ring-2 ring-gray-900 表示] E -->|✅ focus-visible 追加| E1[ring-2 ring-gray-900 表示] F -->|✅ focus-visible 追加| F1[ring-2 ring-gray-900 表示] G -->|✅ focus-visible 追加| G1[ring-2 ring-gray-900 表示] G1 --> H[ダイアログ開く] H --> I[textarea] H --> J[コピーボタン] H --> K[開くリンク] I -->|✅ focus-visible 追加| I1[ring-2 ring-gray-900 表示] J -->|✅ focus-visible 追加| J1[ring-2 ring-gray-900 表示] K -->|✅ focus-visible 追加| K1[ring-2 ring-gray-900 表示] D1 --> L{アクティブ状態?} L -->|Yes: bg-gray-900 + ring-gray-900| M[⚠️ 同色でコントラスト低] L -->|No| N[✅ 適切なコントラスト]%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%% flowchart TD A[キーボード操作 Tab キー] --> B{フォーカス対象} B --> C[Header: OpenShelfロゴリンク] B --> D[Header: ナビリンク] B --> E[Header: ログアウトボタン] B --> F[Header: ログインボタン] B --> G[FeedButton: トリガーボタン] C -->|❌ focus-visible 未対応| C1[フォーカスリング非表示] D -->|✅ focus-visible 追加| D1[ring-2 ring-gray-900 表示] E -->|✅ focus-visible 追加| E1[ring-2 ring-gray-900 表示] F -->|✅ focus-visible 追加| F1[ring-2 ring-gray-900 表示] G -->|✅ focus-visible 追加| G1[ring-2 ring-gray-900 表示] G1 --> H[ダイアログ開く] H --> I[textarea] H --> J[コピーボタン] H --> K[開くリンク] I -->|✅ focus-visible 追加| I1[ring-2 ring-gray-900 表示] J -->|✅ focus-visible 追加| J1[ring-2 ring-gray-900 表示] K -->|✅ focus-visible 追加| K1[ring-2 ring-gray-900 表示] D1 --> L{アクティブ状態?} L -->|Yes: bg-gray-900 + ring-gray-900| M[⚠️ 同色でコントラスト低] L -->|No| N[✅ 適切なコントラスト]Comments Outside Diff (2)
apps/web/src/components/header.tsx, line 23-28 (link)focus-visible対応漏れこのPRはヘッダー内のインタラクティブ要素へのフォーカスリング追加を目的としていますが、「OpenShelf」ロゴの
Linkコンポーネント(23行目)が対応漏れになっています。キーボードナビゲーション時に Tab キーでこのリンクにフォーカスが当たっても、フォーカスインジケーターが表示されません。他のリンク・ボタンと同様にfocus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 dark:focus-visible:ring-gray-100 dark:focus-visible:ring-offset-gray-950を追加してください。Prompt To Fix With AI
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
apps/web/src/components/header.tsx, line 41-45 (link)アクティブな navリンクは
bg-gray-900(ライト)/bg-gray-100(ダーク)の背景を持ちますが、フォーカスリングもring-gray-900(ライト)/ring-gray-100(ダーク)として設定されているため、リングとボタン本体が同色になります。ring-offset-2による2pxの白い間隔があるため完全に不可視ではありませんが、リング自体がボタン外縁と同色で一体化して見えるため、視認性が目的を十分に達成できない可能性があります。ライトモードのアクティブ状態ではring-whiteを、ダークモードのアクティブ状態ではring-gray-900を使うよう条件分岐させるか、ring-offsetの色を明示的に指定することを検討してください。Prompt To Fix With AI
Prompt To Fix All With AI
Reviews (1): Last reviewed commit: "feat(web): improve keyboard focus styles" | Re-trigger Greptile