Skip to content

🎨 Palette: タグ入力サジェストのローディング読み上げを改善#983

Open
is0692vs wants to merge 3 commits into
stagingfrom
palette-tag-autocomplete-a11y-9076758493013077869
Open

🎨 Palette: タグ入力サジェストのローディング読み上げを改善#983
is0692vs wants to merge 3 commits into
stagingfrom
palette-tag-autocomplete-a11y-9076758493013077869

Conversation

@is0692vs

@is0692vs is0692vs commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

💡 What

TagAutocompleteInput コンポーネントにおける非同期ローディング状態(候補を取得中...)のアクセシビリティを改善しました。

  • スクリーンリーダー専用の sr-only クラスを持つ永続的な aria-live="polite" コンテナを追加し、非同期取得中のみテキストを挿入するようにしました。
  • 既存の視覚的なローディング表示(<p>要素)には aria-hidden="true" を追加し、スクリーンリーダーが同じメッセージを二重に読み上げないようにしました。

🎯 Why

従来は、aria-live属性を持つ要素(またはその親)自体が loading 状態に応じて動的にDOMにマウント・アンマウントされていました。スクリーンリーダーはDOMに新しく追加された要素の aria-live 属性を正しく検出できず、ローディング状態が読み上げられない問題がありました。永続的なコンテナを用意し、その中身だけを書き換えることで確実に読み上げられるようになります。

♿ Accessibility

  • 非同期候補検索時の状態変化がスクリーンリーダーに正しく伝わるようになりました。
  • 視覚的なフィードバックと音声フィードバックの二重読み上げを防止しました。

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

Summary by CodeRabbit

Release Notes

  • Bug Fixes
    • Enhanced accessibility for loading states. Screen readers now properly announce when content is being fetched, while visual indicators are appropriately hidden from assistive technologies to prevent duplicate announcements.

Greptile Summary

スクリーンリーダーがタグ候補の非同期取得中ローディング状態を正しく読み上げられるよう、TagAutocompleteInput コンポーネントのアクセシビリティを改善しました。

  • 永続的な aria-live="polite" + sr-only コンテナをDOMに常駐させ、loading 状態に応じてテキスト内容だけを切り替えることで、スクリーンリーダーへの確実なアナウンスを実現しています。
  • 既存の視覚的ローディング表示(<p> 要素)に aria-hidden="true" を追加し、二重読み上げを防止しています。

Confidence Score: 5/5

変更はアクセシビリティの小さな改善に限定されており、既存の機能ロジックには一切手を加えていないため、安全にマージできます。

コンポーネントの動作ロジックは変更されておらず、追加されたのは永続的な aria-live コンテナと aria-hidden 属性のみです。.Jules/palette.md の日付ズレは内部ドキュメントのみに影響する軽微な問題です。

特に注意が必要なファイルはありません。.Jules/palette.md の日付修正は任意対応で問題ありません。

Important Files Changed

Filename Overview
apps/web/src/components/tag-autocomplete-input.tsx 永続的な aria-live="polite" コンテナを追加し、視覚的ローディング表示に aria-hidden="true" を付与。アクセシビリティ改善として適切な実装。
.Jules/palette.md ラーニングログに新エントリを追加。日付が 2024-06-09 となっており、実際の日付(2026-06-09)と2年ずれている。

Sequence Diagram

sequenceDiagram
    participant User as ユーザー
    participant Input as input
    participant SRLive as aria-live div
    participant Visual as p aria-hidden

    User->>Input: テキスト入力(2文字以上)
    Note over Input: debounce 300ms後 setLoading=true
    Input->>SRLive: テキスト変更 "候補を取得中..."
    SRLive-->>User: 読み上げ "候補を取得中..."
    Input->>Visual: "loading=true でマウント"
    Note over Visual: aria-hidden=true のため読み上げなし
    Note over Input: APIレスポンス受信
    Input->>SRLive: テキスト変更 ""
    Input->>Visual: "loading=false でアンマウント"
    Note over SRLive: 空文字なので読み上げなし
    Note over Input: open=true listbox表示
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
.Jules/palette.md:29
エントリの日付が `2024-06-09` となっていますが、現在は `2026-06-09` です。2年分のズレが生じています。

```suggestion
## 2026-06-09 - 動的なローディング状態のアクセシビリティ改善
```

Reviews (1): Last reviewed commit: "a11y: improve dynamic loading notificati..." | Re-trigger Greptile

Greptile also left 1 inline comment on this PR.

- Ensure `aria-live` region is persistently mounted in the DOM
- Conditionally render loading text inside `aria-live` wrapper instead of conditionally mounting the wrapper itself
- Add `aria-hidden="true"` to visual loading text to prevent redundant screen reader announcements

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 Jun 9, 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 17, 2026 1:44am

@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 enhancement New feature or request label Jun 9, 2026
@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 45 minutes and 54 seconds. Learn how PR review limits work.

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

⌛ 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: CHILL

Plan: Pro

Run ID: 3c6b6555-4aa8-474e-8ad0-0d6fd8a5cbe6

📥 Commits

Reviewing files that changed from the base of the PR and between 80216d7 and 7866e45.

📒 Files selected for processing (1)
  • .Jules/palette.md
📝 Walkthrough

Walkthrough

This PR improves accessibility for dynamic loading states in the tag autocomplete component. It adds documentation guidance for implementing screen-reader-friendly loading indicators using persistent aria-live regions, then applies that pattern to TagAutocompleteInput by adding a screen-reader-only status announcement region and hiding the visual loading element from assistive technologies.

Changes

Screen-reader accessibility for loading states

Layer / File(s) Summary
Accessibility guidance for dynamic loading states
.Jules/palette.md
Documentation added specifying that aria-live="polite" regions should remain permanently mounted in the DOM with text-only updates, and visual loading elements should use aria-hidden="true" to prevent duplicate announcements.
Screen-reader-friendly loading state in TagAutocompleteInput
apps/web/src/components/tag-autocomplete-input.tsx
Component now includes a screen-reader-only live region announcing loading state, while the visible loading indicator is marked aria-hidden="true" to follow the documented accessibility pattern.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Possibly related PRs

  • Hiroki-org/OpenShelf#924: Both PRs modify the tag autocomplete input component's loading indicator accessibility with aria-live="polite" and related guidance documentation.

Suggested labels

enhancement, size/S, javascript

Poem

🐰 A loading state whispers now,
Screen readers hear the tale,
Aria-live speaks polite and clear,
Hidden visuals never fail,
Accessible paths prevail! ✨

🚥 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 loading state announcements for tag input suggestions via accessibility enhancements (aria-live and sr-only patterns).
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 palette-tag-autocomplete-a11y-9076758493013077869

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 9, 2026 14:47
@github-actions

github-actions Bot commented Jun 9, 2026

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 dynamic loading states in the TagAutocompleteInput component. It introduces a persistent, visually hidden aria-live="polite" container to ensure screen readers announce the loading state correctly, and marks the visual loading text with aria-hidden="true" to prevent double announcements. Additionally, this accessibility pattern has been documented in .Jules/palette.md. There are no review comments, and I have no additional feedback to provide.

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 thread .Jules/palette.md Outdated
@codecov

codecov Bot commented Jun 9, 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 29: The header "## 2024-06-09 - 動的なローディング状態のアクセシビリティ改善" has the wrong
year; update the date in the header to "2026-06-09" so it reads "## 2026-06-09 -
動的なローディング状態のアクセシビリティ改善", ensuring the rest of the heading text and formatting
remain unchanged.
🪄 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: 6b521d62-17e5-474c-91c0-9fa88068b10c

📥 Commits

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

📒 Files selected for processing (2)
  • .Jules/palette.md
  • apps/web/src/components/tag-autocomplete-input.tsx

Comment thread .Jules/palette.md Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant