Overlay contract: text contrast over the panel and a guard for new overlays (follow-up of #1158)

オープン
#1,299 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
42/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
css, typescript

調査の方向性

Start by reading the alpha test and helpers (expectOpaqueSurface, colorAlpha, surfaceAlpha) that PR #1294 added to @codeatlasdev/ui/testing, then the overlay-token section of AGENTS.md and how Sheet paints --ca-surface-overlay. Extend that test file to render body text over a busy backdrop for each overlay and assert 4.5:1 against the composited panel color in light, dark, glass and frosted, add a guard test that fails when a role="dialog" | "menu" | "listbox" layer or FloatingLayer paints its fill from a non-overlay token, and record a decision on the --ca-sheet-* tokens.

索引モデルが issue の本文から書いたものです。

説明

area:a11y area:tests enhancement

Follow-up of #1158 (PR #1294: expectOpaqueSurface, colorAlpha, surfaceAlpha in @codeatlasdev/ui/testing, and a test that every overlay panel stays at alpha ≥ 0.9 in both schemes on the default, glass and frosted styles; measured 1 for Dialog, AlertDialog, Drawer and Sheet, 0.94 for Popover and DropdownMenu under the blurred styles).

The consumer's evidence comment on #1158 asked for two more things that #1294 leaves out:

  1. Text contrast over the overlay, not only its alpha. The incident behind the contract was body text at 3.5:1 on a see-through panel. A test that renders text in each overlay over a busy backdrop (a high-contrast pattern behind the panel) and measures the text against the composited panel color, in dark and light, on the blurred styles: 4.5:1 for body text.
  2. A guard against a new overlay that skips the contract. Every floating panel paints its fill from the overlay tokens (--ca-overlay-bg, --ca-sheet-bg, --ca-surface-overlay); a lint or unit test that fails when a component with role="dialog" | "menu" | "listbox" (or a FloatingLayer) paints its background from anything else.

Also noticed: Sheet paints --ca-surface-overlay directly, so the --ca-sheet-* tokens AGENTS.md documents for Dialog, AlertDialog and Drawer do not reach it. Decide whether Sheet should read them too.

主要言語
TypeScript
スター
6
フォーク
3
平均マージ
5時間 21分
マージ済み PR(30日)
378

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

codeatlasdev/ui のほかの issue

codeatlasdev/ui の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。