Overlay contract: text contrast over the panel and a guard for new overlays (follow-up of #1158)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- css, typescript
- 领域
- accessibility, testing
调研方向
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 内容生成。
描述
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:
- 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.
- 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 withrole="dialog" | "menu" | "listbox"(or aFloatingLayer) 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 分钟
- 30 天内合并 PR
- 378
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
codeatlasdev/ui 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
codeatlasdev/ui#1340 ·
维护者通常 1 天内回复
-
area:a11y area:components bug
难度 2/5 1-3 小时 新手友好度 76/100
codeatlasdev/ui#1336 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
codeatlasdev/ui#1329 ·
维护者通常 1 天内回复
-
good first issue
难度 2/5 1-3 小时 新手友好度 74/100
codeatlasdev/ui#1292 · 1 条评论 ·
维护者通常 1 天内回复
-
area:components enhancement good first issue
难度 2/5 1-3 小时 新手友好度 68/100
codeatlasdev/ui#1198 ·
维护者通常 1 天内回复
相似的 Issue
-
bug frontend
难度 2/5 1-3 小时 新手友好度 85/100
CivicTechWR/accessible-housing-portal#578 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
nekko-labs/nekko-agent#2998 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 86/100
sandbox-quantum/switch#2163 ·
维护者通常 1 天内回复
-
enhancement ux
难度 2/5 1-3 小时 新手友好度 72/100
lolimmlost/aidj#433 ·
维护者通常 1 天内回复
-
test: ipcShownDialogKeys.test.tsx can fail the unit run with 'window is not defined' after it ends未关闭
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复