Skip to content

🎨 Palette: 動的なフォーム検証ステータスのアクセシビリティ改善#985

Open
is0692vs wants to merge 1 commit into
stagingfrom
palette/a11y-slug-validation-369220659848914274
Open

🎨 Palette: 動的なフォーム検証ステータスのアクセシビリティ改善#985
is0692vs wants to merge 1 commit into
stagingfrom
palette/a11y-slug-validation-369220659848914274

Conversation

@is0692vs

@is0692vs is0692vs commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

💡 What:
コレクション作成ページ (apps/web/src/app/collections/new/page.tsx) と組織作成ページ (apps/web/src/app/orgs/new/page.tsx) における slug の重複チェックステータス表示をアクセシブルにしました。

🎯 Why:
これまで、slug を入力した際の動的な検証結果(「確認中...」「✓ 使用可能」「✗ 使用済み」など)は視覚的にしか表示されておらず、スクリーンリーダーを利用している視覚障害のあるユーザーには、入力内容が妥当かどうかリアルタイムに伝わらない状態でした。

Accessibility:

  • slug の入力欄に aria-describedby を追加し、ステータス表示要素と関連付けました。
  • ステータスを表示する要素に aria-live="polite"aria-atomic="true" を設定し、状態が変化するたびにスクリーンリーダーが内容を自動的に読み上げるようにしました。

PR created automatically by Jules for task 369220659848914274 started by @is0692vs

Summary by CodeRabbit

  • Bug Fixes
    • Improved form validation status announcements for users with screen readers on collection and organization creation pages.

Greptile Summary

コレクション作成ページと組織作成ページの slug 重複チェックステータス表示にアクセシビリティ属性を追加しました。スクリーンリーダーユーザーがリアルタイムの検証結果を把握できるようになっています。

  • slug 入力欄に aria-describedby を追加し、ステータス表示要素と関連付けることで、フォーカス時に現在の状態が読み上げられるようにしました。
  • ステータス要素に aria-live=\"polite\"aria-atomic=\"true\" を設定し、状態変化のたびにスクリーンリーダーが内容全体を自動読み上げするようにしました。
  • .Jules/palette.md に今回の学習内容を追記し、今後同様の実装で同じパターンが再利用できるよう記録しています。

Confidence Score: 4/5

既存機能の視覚的な挙動に変更はなく、ARIA属性の追加のみのため安全にマージできます。

変更はすべてアクセシビリティ属性の追加のみで、既存のロジックやUIの見た目への影響はありません。aria-describedbyaria-livearia-atomic の組み合わせはフォーム検証ステータスの推奨パターンに沿っており、実装も両ページで一貫しています。 / などの記号がスクリーンリーダーで想定外に読み上げられる可能性は残りますが、テキスト本体で意味は伝わるため動作上の問題はありません。

特に注意が必要なファイルはありません。

Important Files Changed

Filename Overview
apps/web/src/app/collections/new/page.tsx slug入力欄にaria-describedby="slug-status"を追加し、ステータス表示 <p> に id/aria-live/aria-atomic を付与。変更は正しく、idle状態で空要素になる挙動も問題なし。
apps/web/src/app/orgs/new/page.tsx slug入力欄にaria-describedby="org-slug-status"を追加し、slugStatusText()を包む <div> に id/aria-live/aria-atomic を付与。パターンは正しく、idle時のnull返却もライブリージョンとして問題なし。
.Jules/palette.md 今回のアクセシビリティ改善の学習内容をPaletteドキュメントに追記。記録として問題なし。

Sequence Diagram

sequenceDiagram
    participant U as ユーザー
    participant I as slug入力欄(aria-describedby)
    participant S as ステータス要素(aria-live=polite)
    participant SR as スクリーンリーダー

    U->>I: フォーカス
    SR-->>U: 入力欄のラベル + aria-describedby の現在値を読み上げ

    U->>I: 文字を入力
    I->>S: "slugStatus = checking"
    S-->>SR: ライブリージョン変化を検知
    SR-->>U: 確認中... を読み上げ (polite)

    I->>S: "slugStatus = available"
    S-->>SR: ライブリージョン変化を検知
    SR-->>U: 使用可能 を読み上げ (polite)

    Note over S,SR: aria-atomic=true により要素全体が一括で読み上げられる
Loading

Comments Outside Diff (1)

  1. apps/web/src/app/collections/new/page.tsx, line 302-305 (link)

    P2 記号文字のスクリーンリーダー読み上げ問題

    はスクリーンリーダーがそれぞれ「チェックマーク」「乗算記号」のように発音することがあります。テキスト自体(「使用可能」「使用済み」)は読み上げられるため致命的ではありませんが、aria-hidden="true" で記号を読み上げ対象から除外すると、よりクリーンなリーダー体験になります。同様の懸念が apps/web/src/app/orgs/new/page.tsxslugStatusText() 内のスパンにも存在します。

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/web/src/app/collections/new/page.tsx
    Line: 302-305
    
    Comment:
    **記号文字のスクリーンリーダー読み上げ問題**
    
    ```` はスクリーンリーダーがそれぞれ「チェックマーク」「乗算記号」のように発音することがあります。テキスト自体(「使用可能」「使用済み」)は読み上げられるため致命的ではありませんが、`aria-hidden="true"` で記号を読み上げ対象から除外すると、よりクリーンなリーダー体験になります。同様の懸念が `apps/web/src/app/orgs/new/page.tsx``slugStatusText()` 内のスパンにも存在します。
    
    How can I resolve this? If you propose a fix, please make it concise.

    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!

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/web/src/app/collections/new/page.tsx:302-305
**記号文字のスクリーンリーダー読み上げ問題**

```` はスクリーンリーダーがそれぞれ「チェックマーク」「乗算記号」のように発音することがあります。テキスト自体(「使用可能」「使用済み」)は読み上げられるため致命的ではありませんが、`aria-hidden="true"` で記号を読み上げ対象から除外すると、よりクリーンなリーダー体験になります。同様の懸念が `apps/web/src/app/orgs/new/page.tsx``slugStatusText()` 内のスパンにも存在します。

Reviews (1): Last reviewed commit: "🎨 Palette: 動的なフォーム検証ステータスのアクセシビリティを改善" | Re-trigger Greptile

コレクションと組織の作成ページにおける `slug` の重複チェック(動的検証)の結果がスクリーンリーダーで適切に読み上げられるように修正しました。

- `slug` 入力欄に `aria-describedby` を追加
- ステータスメッセージのコンテナに `aria-live="polite"` と `aria-atomic="true"` を追加

Co-authored-by: is0692vs <135803462+is0692vs@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 →

@vercel

vercel Bot commented Jun 10, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
open-shelf Ignored Ignored Jun 10, 2026 2:50pm

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR enhances form validation accessibility by adding ARIA live regions to slug status messages in two collection/organization creation pages and documenting the pattern in project guidance. The slug input fields are linked to their status messages via aria-describedby, and status containers gain aria-live="polite" and aria-atomic="true" for dynamic announcement support.

Changes

Form Validation Status Accessibility

Layer / File(s) Summary
ARIA live regions and descriptive associations for slug status
.Jules/palette.md, apps/web/src/app/collections/new/page.tsx, apps/web/src/app/orgs/new/page.tsx
Slug input fields now reference their associated status messages via aria-describedby, and slug status elements are wrapped with aria-live="polite" and aria-atomic="true" to announce validation changes. Project accessibility guidance is updated to document this pattern.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

  • Hiroki-org/OpenShelf#918: This PR reintroduces aria-live="polite" on form validation status elements in the same two pages, directly addressing the accessibility pattern flagged in that issue.

Possibly related PRs

  • Hiroki-org/OpenShelf#792: Both PRs update .Jules/palette.md with accessibility guidance for associating form UI elements via aria-describedby and using aria-live/aria-atomic patterns.
  • Hiroki-org/OpenShelf#926: Both PRs apply the same aria-describedby, aria-live="polite", and aria-atomic="true" accessibility improvements to slug validation status in collections and orgs pages.
  • Hiroki-org/OpenShelf#758: Both PRs update .Jules/palette.md accessibility guidance and implement aria-describedby associations for dynamic form information across similar form components.

Suggested labels

enhancement, javascript

Poem

🐰 ARIA whispers softly through the form,
"Polite" and "atomic," keeping users warm—
Each status lives, described with care,
Accessibility blooms everywhere!

🚥 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 directly addresses the main change: improving accessibility of dynamic form validation status messages using ARIA attributes. It accurately reflects the core objective of the pull request.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch palette/a11y-slug-validation-369220659848914274

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.

@github-actions github-actions Bot changed the base branch from main to staging June 10, 2026 14:50
@github-actions

Copy link
Copy Markdown

このリポジトリでは staging 先行フローを採用しています。PR のターゲットを staging に変更しました。staging で動作確認後、stagingmain の PR を作成してください。

@codecov

codecov Bot commented Jun 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 @.Jules/palette.md:
- Line 30: The date in the guidance entry header "## 2024-06-10 -
フォーム検証ステータスのアクセシビリティ向上" is incorrect; update the year to 2026 so the header
reads "## 2026-06-10 - フォーム検証ステータスのアクセシビリティ向上" by editing that markdown header
in .Jules/palette.md.
🪄 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: CHILL

Plan: Pro

Run ID: dfc4fb37-a801-418c-82ca-08903844d161

📥 Commits

Reviewing files that changed from the base of the PR and between a35977c and e8ed72d.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • apps/web/src/app/collections/new/page.tsx
  • apps/web/src/app/orgs/new/page.tsx

Comment thread .Jules/palette.md
**Learning:** フィードボタン(FeedButton)などのアイコン・記号のみのUIにおいて、クリップボードへのコピーや新規タブで開くといったアクションを実行するボタン/リンクには、ユーザーが目的を把握できるように明確な aria-label を設定することが重要です。二重読み上げを防止するため、title 属性との併用は避けるべきです。
**Action:** 今後、アイコンボタンやラベルが不足しているインタラクティブ要素を実装・改善する際は、必ず aria-label に詳細な説明を含めるようにします。アクセシリティ向上のため、title 属性は原則として併用しません。また、アクセシブルな名前を変更した場合は、関連する単体テスト(getByRole などのクエリ)も必ず追従して修正します。

## 2024-06-10 - フォーム検証ステータスのアクセシビリティ向上

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Correct the date in the guidance entry.

The date shows "2024-06-10" but this PR was created on 2026-06-10. The year should be 2026 to accurately reflect when this guidance was added.

📅 Proposed fix
-## 2024-06-10 - フォーム検証ステータスのアクセシビリティ向上
+## 2026-06-10 - フォーム検証ステータスのアクセシビリティ向上
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## 2024-06-10 - フォーム検証ステータスのアクセシビリティ向上
## 2026-06-10 - フォーム検証ステータスのアクセシビリティ向上
🤖 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 @.Jules/palette.md at line 30, The date in the guidance entry header "##
2024-06-10 - フォーム検証ステータスのアクセシビリティ向上" is incorrect; update the year to 2026 so
the header reads "## 2026-06-10 - フォーム検証ステータスのアクセシビリティ向上" by editing that
markdown header in .Jules/palette.md.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request improves the accessibility of form validation statuses on the collection and organization creation pages by adding aria-describedby, aria-live="polite", and aria-atomic="true" attributes, and documents this practice in .Jules/palette.md. Feedback suggests dynamically changing the text color of the validation status in the collection creation page based on the status (e.g., green for available, red for taken) to improve visual feedback and maintain consistency.

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.

Comment on lines +296 to +301
<p
id="slug-status"
aria-live="polite"
aria-atomic="true"
className="text-xs mt-1 text-gray-500"
>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

検証ステータス(「使用可能」「使用済み」「無効」など)のテキスト色が常に text-gray-500(灰色)のままになっています。

ユーザーがステータス(成功・エラーなど)を視覚的に直感的に識別できるように、ステータスに応じて動的にテキスト色を変更し、さらにダークモード(dark:)にも対応させることを推奨します。これにより、組織作成ページ(orgs/new/page.tsx)の表示とも一貫性が保たれます。

          <p
            id="slug-status"
            aria-live="polite"
            aria-atomic="true"
            className={`text-xs mt-1 ${
              slugStatus === "available"
                ? "text-green-600 dark:text-green-400"
                : slugStatus === "taken" || slugStatus === "invalid"
                  ? "text-red-600 dark:text-red-400"
                  : "text-gray-500 dark:text-gray-400"
            }`}
          >

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant