In dark mode the reader rendered HTML emails as black-on-black: the WebView
background was TRANSPARENT (the near-black app surface showed through) and the
injected CSS defined no text/background color, so the WebView used its default
black text.
Wrap each email with explicit, theme-derived background/color/link colors
(surface / onSurface / primary) and a matching color-scheme.
Set the WebView background to the surface color (no more transparent
show-through).
Enable WebView algorithmic darkening where supported (androidx.webkit) as a
backstop for emails that hardcode their own foreground colors.
Tests
HtmlBodyTest — pins the wrapper's readability contract (explicit colors that
meet WCAG AA in both light and dark).
ColorSchemeContrastTest — audits the fallback Material light/dark schemes'
role pairs for WCAG AA contrast.
CI
Make the API 37 preview E2E job required by adding it to the aggregating ci-passed gate's needs (the preview emulator has proven stable). No branch
protection change needed — ci-passed is the single required check.
## Dark-mode reader readability
In dark mode the reader rendered HTML emails as **black-on-black**: the WebView
background was `TRANSPARENT` (the near-black app surface showed through) and the
injected CSS defined no text/background color, so the WebView used its default
black text.
- Wrap each email with explicit, theme-derived `background`/`color`/link colors
(`surface` / `onSurface` / `primary`) and a matching `color-scheme`.
- Set the WebView background to the surface color (no more transparent
show-through).
- Enable WebView algorithmic darkening where supported (`androidx.webkit`) as a
backstop for emails that hardcode their own foreground colors.
### Tests
- `HtmlBodyTest` — pins the wrapper's readability contract (explicit colors that
meet WCAG AA in both light and dark).
- `ColorSchemeContrastTest` — audits the fallback Material light/dark schemes'
role pairs for WCAG AA contrast.
## CI
- Make the **API 37 preview E2E** job required by adding it to the aggregating
`ci-passed` gate's `needs` (the preview emulator has proven stable). No branch
protection change needed — `ci-passed` is the single required check.
## Verification
- `./gradlew testDebugUnitTest assembleDebug` — green.
- Manually verified on the API 37 emulator in dark mode: reader text is
light-on-dark and readable, links light blue, no black-on-black.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Dark-mode reader readability
In dark mode the reader rendered HTML emails as black-on-black: the WebView
background was
TRANSPARENT(the near-black app surface showed through) and theinjected CSS defined no text/background color, so the WebView used its default
black text.
background/color/link colors(
surface/onSurface/primary) and a matchingcolor-scheme.show-through).
androidx.webkit) as abackstop for emails that hardcode their own foreground colors.
Tests
HtmlBodyTest— pins the wrapper's readability contract (explicit colors thatmeet WCAG AA in both light and dark).
ColorSchemeContrastTest— audits the fallback Material light/dark schemes'role pairs for WCAG AA contrast.
CI
ci-passedgate'sneeds(the preview emulator has proven stable). No branchprotection change needed —
ci-passedis the single required check.Verification
./gradlew testDebugUnitTest assembleDebug— green.light-on-dark and readable, links light blue, no black-on-black.
🤖 Generated with Claude Code