Skip to content

fix(mobile): inkSubtle 三主题达 WCAG AA 对比度 - #1737

Merged
DeliciousBuding merged 2 commits into
masterfrom
fix/shared-i18n-a11y
Aug 17, 2026
Merged

fix(mobile): inkSubtle 三主题达 WCAG AA 对比度#1737
DeliciousBuding merged 2 commits into
masterfrom
fix/shared-i18n-a11y

Conversation

@DeliciousBuding

Copy link
Copy Markdown
Collaborator

背景

移动端 inkSubtle 在三主题上均低于 WCAG AA 4.5:1:dark/oled #666875 在 canvas 上仅 2.92:1,light #8a8d98 仅 3.12:1。inkSubtleListRowTasksScreenChatScreenSearchField(placeholder)、ThreadsScreen 等 17 处消费点用于 meta/caption 文本。component-acceptance.md §4 明确「muted 文本不低于 4.5:1」。同时这是 token 漂移——web --text-3 已有 AA 注释。

变更

  • app/mobile-rn/src/theme/tokens.ts:dark/oled inkSubtle#666875 提到 #8a8d98(dark canvas 4.90:1,oled canvas 6.34:1);light 从 #8a8d98 降到 #6b6e78(4.65:1)。三主题均 ≥ 4.5:1 且保持 ink > inkMuted > inkSubtle 层级。
  • app/mobile-rn/src/theme/tokens.test.ts:新增 hexToRgb/relativeLuminance/contrastRatio WCAG 计算器与 keeps inkSubtle at or above WCAG AA contrast (4.5:1) on canvas for every theme 断言,防止未来回归。

证据

  • real_tested=false:单元测试覆盖对比度数学;未在真机/模拟器截图。
  • 本地门禁:corepack pnpm --filter agenthub-mobile-rn test(351 passed, 27 files)全绿。

关联

审计 P0-2:mobile inkSubtle 对比度不达 AA。

@coderabbitai

coderabbitai Bot commented Aug 17, 2026

Copy link
Copy Markdown

Warning

Review limit reached

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

Next review available in: 8 minutes

Limit details: You’ve used all 1 included review currently available under your plan.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

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 Plus

Run ID: 27ab65f5-863c-4207-b9af-5e6aafc4d8c6

📥 Commits

Reviewing files that changed from the base of the PR and between ab7559d and 69e9697.

📒 Files selected for processing (2)
  • app/mobile-rn/src/theme/tokens.test.ts
  • app/mobile-rn/src/theme/tokens.ts

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.

DeliciousBuding and others added 2 commits August 17, 2026 17:41
dark/oled inkSubtle #666875 在 canvas 上仅 2.92:1,远低于 AA 4.5:1;light #8a8d98 也仅 3.12:1。dark/oled 提到 #8a8d98(4.90:1),light 降到 #6b6e78(4.65:1),17 处消费点(ListRow/SearchField/ChatScreen 等 meta 文本)恢复可读。新增 WCAG 对比度计算器与断言测试。

Co-authored-by: Cursor <cursor@vectorcontrol.tech>
Co-authored-by: Cursor <cursor@vectorcontrol.tech>
@DeliciousBuding
DeliciousBuding merged commit 616acdc into master Aug 17, 2026
29 checks passed
@DeliciousBuding
DeliciousBuding deleted the fix/shared-i18n-a11y branch August 17, 2026 09:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant