Skip to content

🎨 Palette: Add focus-visible styles to custom buttons for keyboard accessibility#383

Merged
genzouw merged 5 commits into
mainfrom
ux/button-focus-visible-2368959091124590687
May 29, 2026
Merged

🎨 Palette: Add focus-visible styles to custom buttons for keyboard accessibility#383
genzouw merged 5 commits into
mainfrom
ux/button-focus-visible-2368959091124590687

Conversation

@genzouw

@genzouw genzouw commented May 29, 2026

Copy link
Copy Markdown
Owner

💡 What: Added focus-visible styles to multiple interactive elements (buttons, tabs) across various pages (Channels.tsx, FormEdit.tsx, Submissions.tsx, Contact.tsx, FaqArticle.tsx, AdminContactDetail.tsx).
🎯 Why: Custom button components and raw <button> elements often lack visual focus indicators when navigated via keyboard. Without explicit focus-visible utility classes, these interactive elements become invisible to keyboard users, severely degrading accessibility.
♿ Accessibility: Ensures that users navigating via keyboard can clearly see which element currently has focus using standard Tailwind CSS utility classes (e.g., focus-visible:ring-2, focus-visible:outline-none, transition-colors), while avoiding persistent outlines for mouse users. Documented this learning in .jules/palette.md.


PR created automatically by Jules for task 2368959091124590687 started by @genzouw

Summary by CodeRabbit

Style

  • 複数のページで、ボタンのキーボードフォーカス時の表示を改善しました。フォーカスリングと遷移アニメーションを追加し、より明確でスムーズなビジュアルフィードバックを実現します。

Review Change Stack

…cessibility

Co-authored-by: genzouw <29957+genzouw@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.

@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@coderabbitai

coderabbitai Bot commented May 29, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@genzouw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 1 second. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fbac6211-3c2c-482f-b353-8122ab32f6cc

📥 Commits

Reviewing files that changed from the base of the PR and between 0ae767b and 4d74b44.

📒 Files selected for processing (7)
  • .codacy.yaml
  • frontend/src/pages/Channels.tsx
  • frontend/src/pages/Contact.tsx
  • frontend/src/pages/FaqArticle.tsx
  • frontend/src/pages/FormEdit.tsx
  • frontend/src/pages/Submissions.tsx
  • frontend/src/pages/admin/AdminContactDetail.tsx
📝 Walkthrough

Walkthrough

複数ページのボタン要素に対して、focus-visible リング表示と transition-colors クラスを追加し、キーボードフォーカス時のアクセシビリティを向上させました。既存の削除・コピー・ステータス切替などの機能に変更はありません。

Changes

ボタンフォーカス可視化スタイル

Layer / File(s) Summary
コア対話ボタンのフォーカス可視化
frontend/src/pages/Channels.tsx, frontend/src/pages/Contact.tsx, frontend/src/pages/FaqArticle.tsx
チャネル削除・Webhook コピーボタンに focus-visible リングと transition-colors を追加。お問い合わせページの継続ボタンと FAQ の「役に立った/役に立たなかった」ボタンにも同様にフォーカス表示とカラー遷移を加えました。
フォーム・管理ボタンのフォーカス可視化
frontend/src/pages/FormEdit.tsx, frontend/src/pages/Submissions.tsx, frontend/src/pages/admin/AdminContactDetail.tsx
フォーム削除ボタンと「ビジュアル」「JSON」タブボタン、管理画面のステータス切替ボタン、CSV ダウンロードボタンに focus-visible リング・リングオフセット・transition-colors を追加し、キーボードナビゲーション時のフォーカス表示を統一しました。

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • genzouw/toique#287: Channels.tsxFormEdit.tsx の削除ボタン周辺の属性更新で、本 PR は focus-visible スタイル追加、比較対象 PR は title/aria-label 追加のため関連しています。
🚥 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 PRのタイトルは、複数ファイルにおけるカスタムボタンへの focus-visible スタイル追加という主要な変更を正確に要約しており、キーボードアクセシビリティの改善という明確な目的を示しています。
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ux/button-focus-visible-2368959091124590687

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 and usage tips.

@codacy-production

codacy-production Bot commented May 29, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 0 duplication

Metric Results
Complexity 0
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

本プルリクエストは、キーボードナビゲーションを利用するユーザーのアクセシビリティを改善することを目的としています。カスタムボタンやインタラクティブな要素に適切なフォーカスインジケーターを適用することで、操作中の要素を明確に識別できるようにしました。マウスユーザーには不要なアウトラインを表示させず、キーボードユーザーには必要な視覚的フィードバックを提供する設計となっています。

Highlights

  • アクセシビリティの向上: キーボード操作時の視認性を高めるため、複数のインタラクティブ要素にfocus-visibleスタイルを追加しました。
  • Tailwind CSSの活用: フォーカスリング(ring-2)やオフセット、スムーズな遷移アニメーションを導入し、キーボードユーザーにとって明確なフィードバックを提供します。
  • 対象範囲の拡大: Channels、FormEdit、Submissions、Contact、FaqArticle、AdminContactDetailなど、主要なページ内のボタンやタブ要素を対象に修正を行いました。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

このプルリクエストでは、複数のフロントエンドコンポーネント(Channels.tsx、Contact.tsx、FaqArticle.tsx、FormEdit.tsx、Submissions.tsx、AdminContactDetail.tsx)のボタン要素に対して、キーボード操作時のアクセシビリティ向上を目的としたフォーカススタイル(focus-visible:outline-none focus-visible:ring-2 など)および transition-colors クラスを追加しています。これにより、フォーカス時の視認性と操作性が向上します。レビューコメントは存在しないため、追加のフィードバックはありません。

@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.

Actionable comments posted: 1

🤖 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.

Inline comments:
In `@frontend/src/pages/Channels.tsx`:
- Line 165: Replace the use of focus-visible:outline-none in the element that
currently has className including "focus-visible:outline-none
focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-1" (in
Channels.tsx) with focus-visible:outline-hidden so the visual outline is hidden
but preserved in forced-colors/high-contrast modes; update the className string
accordingly where the button/element with p-2 text-red-600 hover:bg-red-50
rounded-md shrink-0 is defined.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8828e6ac-39f3-4c7d-88d5-f700926ef1c4

📥 Commits

Reviewing files that changed from the base of the PR and between 25afed0 and 0ae767b.

📒 Files selected for processing (6)
  • frontend/src/pages/Channels.tsx
  • frontend/src/pages/Contact.tsx
  • frontend/src/pages/FaqArticle.tsx
  • frontend/src/pages/FormEdit.tsx
  • frontend/src/pages/Submissions.tsx
  • frontend/src/pages/admin/AdminContactDetail.tsx

Comment thread frontend/src/pages/Channels.tsx Outdated
genzouw added 2 commits May 30, 2026 07:38
Tailwind CSS v4 では `outline-none` は単純に `outline-style: none` を適用するだけで、
forced-colors(ハイコントラスト)モードでもアウトラインが消えてしまうため、
アクセシビリティ上の利点を失う。`outline-hidden` は見た目を隠しつつ強制カラー
モードではアウトラインを維持するため、Tailwind v4 公式でもアクセシビリティ
維持のために推奨されている。

本PRで新規追加した focus-visible スタイル 10 箇所(Channels:2 / Contact:1 /
FaqArticle:2 / FormEdit:3 / Submissions:1 / AdminContactDetail:1)を
`focus-visible:outline-none` から `focus-visible:outline-hidden` に置換。

レビューコメント: #383 (comment)
レビュアー: coderabbitai
優先度: medium (accessibility)
genzouw added 2 commits May 30, 2026 07:52
フロントエンドは ESLint + Prettier を採用しており Biome は導入していないが、
Codacy のデフォルトで Biome 解析が有効になっており、React プロジェクトの
`className` 属性に対して `Biome_lint_suspicious_noReactSpecificProps`
(Preact/Solid 等を想定したルール) が false positive として検知され、
Quality Gate (1 new issue / 0 max) を恒常的に fail させる原因となっていた。

.codacy.yaml を追加し、engines.biome.enabled: false を明示することで
Biome 解析を停止し、PR の CI を unblock する。
前コミット 0d38101 で `engines.biome.enabled: false` を指定したが、Codacy 公式
ドキュメント (https://docs.codacy.com/repositories-configure/codacy-configuration-file/)
によると設定ファイルではツール自体の enable/disable は切り替えられず、
Code patterns UI 経由でのみ可能とのこと。そのため `enabled: false` は無視され、
Biome の誤検知 (`Biome_lint_suspicious_noReactSpecificProps`) が解消されず
Quality Gate が引き続き fail していた。

設定ファイルでサポートされている `exclude_paths` で全パス (`**`) を Biome から
除外することで実質的に Biome 解析を無効化する。
@genzouw genzouw merged commit 3553a96 into main May 29, 2026
16 checks passed
@genzouw genzouw deleted the ux/button-focus-visible-2368959091124590687 branch May 29, 2026 23:04
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