[Bug]: Login V2 error alert text fails WCAG contrast (2.6:1) and ignores the branding warnColor
Preflight Checklist
- I could not find a solution in the documentation, the existing issues or discussions
Related to #7020 (general WCAG compliance). This issue reports one specific, measurable defect.
Environment
Self-hosted
Version
v4.19.2 (ghcr.io/zitadel/zitadel and ghcr.io/zitadel/zitadel-login)
Database
PostgreSQL
Database Version
17.10
Describe the problem caused by this bug
On the V2 login app, error messages are rendered inside the Alert component with type === AlertType.ALERT. Examples: a wrong password, or otp.errors.couldNotVerifyCode on the one-time code page.
apps/login/src/components/alert.tsx at v4.19.2, lines 15-16:
const yellow =
"border-yellow-600/40 dark:border-yellow-500/20 bg-yellow-200/30 text-yellow-600 dark:bg-yellow-700/20 dark:text-yellow-200";In light mode, the text is yellow-600 on yellow-200 at 30 % opacity over the page background.
- Measured on screenshots of two error screens (password page and code page):
#D08700on#F6F3D4, contrast ratio 2.61:1. - Computed from the Tailwind values: 2.64:1.
WCAG 2.2 success criterion 1.4.3 requires 4.5:1 for normal text and 3:1 for large text. The message is 14 px, so it fails both thresholds.
The label policy warnColor does not apply to this component, so an instance owner cannot fix the contrast through branding settings.
To reproduce
- Run the V2 login (v4.19.2) with the light theme.
- Enter a wrong password, or a wrong one-time code.
- Measure the contrast of the error text against its background.
Expected behavior
The error text reaches at least 4.5:1 in light mode. Alternatively, it takes its color from the label policy warnColor, so that the instance owner can choose a compliant color.
Operating System
Desktop Chrome, light theme. The defect comes from the component's CSS classes, so it does not depend on the browser.
Source: zitadel/zitadel