Skip to content

🎨 Palette: 組織スラッグ入力のアクセシビリティ向上#1106

Closed
is0692vs wants to merge 2 commits into
stagingfrom
improve-org-slug-accessibility-14524697182267444360
Closed

🎨 Palette: 組織スラッグ入力のアクセシビリティ向上#1106
is0692vs wants to merge 2 commits into
stagingfrom
improve-org-slug-accessibility-14524697182267444360

Conversation

@is0692vs

@is0692vs is0692vs commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

💡 What: 組織作成ページのスラッグ入力フィールドに aria-describedbyaria-live="polite" を追加し、バリデーション状況(「使用可能」「使用済み」の状態)をスクリーンリーダーが動的に読み上げるようにしました。また、装飾的な「✓」と「✗」の記号を aria-hidden="true" で囲みました。
🎯 Why: 入力チェックの結果がスクリーンリーダーユーザーに伝わらず、フォームの進行が困難になる問題を解決するため。
♿ Accessibility: 動的バリデーションの読み上げサポート (aria-live) と、ノイズとなる不要な記号読み上げの防止 (aria-hidden) を行いました。


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

Greptile Summary

組織作成ページのスラッグ入力フィールドに aria-describedby / aria-live="polite" を追加し、動的バリデーション結果をスクリーンリーダーが読み上げられるようにしたアクセシビリティ改善 PR です。既存テストも aria-hidden でラップされた記号を除いた文字列に正しく更新されています。

  • page.tsx: / <span aria-hidden="true"> でラップし、ステータス divid="org-slug-status"aria-live="polite" を、inputaria-describedby="org-slug-status" を追加。
  • orgs-new.test.tsx: getByText("✓ 使用可能")getByText("使用可能") へ変更。Testing Library は直接の子テキストノードのみを比較するため、この変更は正しく動作する。
  • .Jules/palette.md: 今回の学びをパターンドキュメントに追記。

Confidence Score: 4/5

アクセシビリティ属性の追加とテスト更新のみで、既存ロジックへの影響はなく安全にマージできます。

aria-live="polite" に aria-atomic="true" が付いていないため、スクリーンリーダーによってはリージョン全体ではなく変更差分だけを読み上げる実装差が出る可能性がありますが、機能的なデグレードは生じません。コアロジック・テスト・UIに問題はありません。

apps/web/src/app/orgs/new/page.tsx の div#org-slug-status に aria-atomic="true" を追加するかどうか確認してください。

Important Files Changed

Filename Overview
apps/web/src/app/orgs/new/page.tsx aria-describedby / aria-live / aria-hidden の追加によるアクセシビリティ改善。実装は正しいが、aria-atomic="true" が未設定でスクリーンリーダー間の挙動に差が生じる可能性がある。
apps/web/src/app/tests/orgs-new.test.tsx getByText の対象を "✓ 使用可能" から "使用可能" へ3箇所変更。Testing Library が直接テキストノードのみを収集する動作を踏まえた正しい修正。
.Jules/palette.md 今回の実装パターン(aria-live + aria-describedby + aria-hidden)をチーム学習ドキュメントに追記。

Sequence Diagram

%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
    actor SR as スクリーンリーダー
    participant Input as input#org-slug
    participant LiveRegion as div#org-slug-status
    participant Page as NewOrgPage

    SR->>Input: フォーカス取得
    Input-->>SR: ラベル「スラッグ」を読み上げ
    SR->>LiveRegion: aria-describedby 経由で説明を読み上げ

    Input->>Page: ユーザー入力 (onChange)
    Page->>Page: debounce 400ms
    Page->>LiveRegion: 「確認中...」を設定
    LiveRegion-->>SR: polite モードで通知

    Page->>Page: apiFetch(/api/orgs/:slug)
    alt 404 (使用可能)
        Page->>LiveRegion: span[aria-hidden]✓ + 使用可能
        LiveRegion-->>SR: 「使用可能」を読み上げ
    else 200 (使用済み)
        Page->>LiveRegion: span[aria-hidden]✗ + 使用済み
        LiveRegion-->>SR: 「使用済み」を読み上げ
    end
Loading
%%{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"}}}%%
sequenceDiagram
    actor SR as スクリーンリーダー
    participant Input as input#org-slug
    participant LiveRegion as div#org-slug-status
    participant Page as NewOrgPage

    SR->>Input: フォーカス取得
    Input-->>SR: ラベル「スラッグ」を読み上げ
    SR->>LiveRegion: aria-describedby 経由で説明を読み上げ

    Input->>Page: ユーザー入力 (onChange)
    Page->>Page: debounce 400ms
    Page->>LiveRegion: 「確認中...」を設定
    LiveRegion-->>SR: polite モードで通知

    Page->>Page: apiFetch(/api/orgs/:slug)
    alt 404 (使用可能)
        Page->>LiveRegion: span[aria-hidden]✓ + 使用可能
        LiveRegion-->>SR: 「使用可能」を読み上げ
    else 200 (使用済み)
        Page->>LiveRegion: span[aria-hidden]✗ + 使用済み
        LiveRegion-->>SR: 「使用済み」を読み上げ
    end
Loading
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/orgs/new/page.tsx:199
`aria-live="polite"` 単体では、スクリーンリーダーの実装によってはライブリージョン内の変更箇所だけを読み上げる場合があります。`aria-atomic="true"` を追加すると、状態が切り替わるたびにリージョン全体(「使用可能」「使用済み」など)を丸ごと読み上げることが保証され、NVDA・JAWS・VoiceOver 間での挙動の揺れを防げます。

```suggestion
          <div id="org-slug-status" aria-live="polite" aria-atomic="true" className="mt-1">
```

Reviews (1): Last reviewed commit: "feat: 組織スラッグ入力のアクセシビリティ向上" | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

Context used:

  • Context used - 日本語で!!! (source)

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.

@vercel

vercel Bot commented Jul 13, 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 Jul 13, 2026 3:27pm

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

@dosubot dosubot Bot added the javascript Pull requests that update javascript code label Jul 13, 2026
@coderabbitai

coderabbitai Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@is0692vs, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

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.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3769957d-67e2-484b-8786-9d36946de9a7

📥 Commits

Reviewing files that changed from the base of the PR and between 1de19c1 and 2264e26.

📒 Files selected for processing (3)
  • .Jules/palette.md
  • apps/web/src/app/__tests__/orgs-new.test.tsx
  • apps/web/src/app/orgs/new/page.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-org-slug-accessibility-14524697182267444360

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.

@github-actions
github-actions Bot changed the base branch from main to staging July 13, 2026 15:18
@github-actions

Copy link
Copy Markdown

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

@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 the organization slug validation on the organization creation page. It hides decorative checkmarks and cross marks from screen readers using aria-hidden="true", and links the input field to its validation status using aria-describedby and aria-live="polite". The review feedback correctly points out that because the text "使用可能" is now nested alongside another span, the exact text matcher screen.getByText("使用可能") in the tests will fail. It is recommended to use a regular expression like /使用可能/ to match the text correctly.

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.

});

expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText("使用可能")).toBeInTheDocument();

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

HTML構造が <span><span aria-hidden="true">✓ </span>使用可能</span> に変更されたため、screen.getByText("使用可能") は完全一致(exact: true)で要素を見つけることができず、テストが失敗します。テキストが子要素に分割されている場合でも正しくマッチするように、正規表現 /使用可能/ を使用することをお勧めします。

Suggested change
expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText(/使/)).toBeInTheDocument();

});

expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText("使用可能")).toBeInTheDocument();

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

HTML構造が <span><span aria-hidden="true">✓ </span>使用可能</span> に変更されたため、screen.getByText("使用可能") は完全一致(exact: true)で要素を見つけることができず、テストが失敗します。テキストが子要素に分割されている場合でも正しくマッチするように、正規表現 /使用可能/ を使用することをお勧めします。

Suggested change
expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText(/使/)).toBeInTheDocument();

});

expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText("使用可能")).toBeInTheDocument();

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

HTML構造が <span><span aria-hidden="true">✓ </span>使用可能</span> に変更されたため、screen.getByText("使用可能") は完全一致(exact: true)で要素を見つけることができず、テストが失敗します。テキストが子要素に分割されている場合でも正しくマッチするように、正規表現 /使用可能/ を使用することをお勧めします。

Suggested change
expect(screen.getByText("使用可能")).toBeInTheDocument();
expect(screen.getByText(/使/)).toBeInTheDocument();

@codecov

codecov Bot commented Jul 13, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
apps/web/src/app/orgs/new/page.tsx 50.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

/>
</div>
<div className="mt-1">{slugStatusText()}</div>
<div id="org-slug-status" aria-live="polite" className="mt-1">

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.

P2 aria-live="polite" 単体では、スクリーンリーダーの実装によってはライブリージョン内の変更箇所だけを読み上げる場合があります。aria-atomic="true" を追加すると、状態が切り替わるたびにリージョン全体(「使用可能」「使用済み」など)を丸ごと読み上げることが保証され、NVDA・JAWS・VoiceOver 間での挙動の揺れを防げます。

Suggested change
<div id="org-slug-status" aria-live="polite" className="mt-1">
<div id="org-slug-status" aria-live="polite" aria-atomic="true" className="mt-1">
Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/web/src/app/orgs/new/page.tsx
Line: 199

Comment:
`aria-live="polite"` 単体では、スクリーンリーダーの実装によってはライブリージョン内の変更箇所だけを読み上げる場合があります。`aria-atomic="true"` を追加すると、状態が切り替わるたびにリージョン全体(「使用可能」「使用済み」など)を丸ごと読み上げることが保証され、NVDA・JAWS・VoiceOver 間での挙動の揺れを防げます。

```suggestion
          <div id="org-slug-status" aria-live="polite" aria-atomic="true" className="mt-1">
```

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!

Co-authored-by: is0692vs <135803462+is0692vs@users.noreply.github.com>
@is0692vs

Copy link
Copy Markdown
Contributor Author

Closing this old conflicting 4/5 branch rather than resolving generated documentation, test, and page conflicts for a small accessibility attribute change.

@is0692vs is0692vs closed this Jul 18, 2026
@is0692vs
is0692vs deleted the improve-org-slug-accessibility-14524697182267444360 branch July 18, 2026 09:02
@google-labs-jules

Copy link
Copy Markdown
Contributor

Closing this old conflicting 4/5 branch rather than resolving generated documentation, test, and page conflicts for a small accessibility attribute change.

了解しました。このPRがクローズされることを確認し、このタスクでの作業を終了します。

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

Labels

javascript Pull requests that update javascript code size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant