← Back to Pull requests

frontend: give links and license operators sufficient contrast #1640

Closed
unknown closed this pull request without merging on Nov 03, 2026 22:05 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 21:29 UTC
Author

The Lighthouse accessibility audit (as in PageSpeed Insights) gives "Background and foreground colors do not have a sufficient contrast ratio" for the links in the light theme. The minimum contrast for normal text is 4.5:1.

  • --link-color #007dbb had 4.32:1 on the header background #fafafa (for example "Functions" and "NixOS Wiki") and 4.21:1 on the code background #f7f7f9 (the license links). Now it is #0078b4, which has the same hue and 4.52:1 or more on the light backgrounds.

  • --search-result-title-color #08c had 3.89:1 on white. Now it is var(--link-color), as in the dark theme.

  • .license-operator (AND, OR, WITH) had opacity: 0.75, with 3.36:1 in the light theme and 3.41:1 in the dark theme. The bold weight keeps the operators different from the license names, thus the opacity is removed.
  • The audit "Links rely on color to be distinguishable" also failed: the links in a license expression and the Repology link in the package details were different from the text around them only by color. Now they are underlined. The license item gets the class package-license for this.

    The dark theme colors of links do not change.

    Test

    With axe-core (the engine of Lighthouse) in headless Chromium, the rules color-contrast and link-in-text-block give no findings in the light and the dark theme on:

  • /packages and /options without a query

  • /packages?query=openssl with the details of openssl and rPackages.openssl open

  • /options?query=openssl with an option open

  • /flakes?query=nix
  • Before this change, the light theme gave 2 to 100 findings on each of these pages.

    elm-format --validate passes. elm-review gives the same findings as on main.

    Assisted-by: Claude:claude-opus-5-5

    https://claude.ai/code/session_01RbKyH4BqJsALnGLHTjmKKo

    Diff: 226 lines (+169 / -57) across 2 files Reviewer: Sigmanificient Review duration: 35m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.37 · 226 lines diff across 2 files
    0.37
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.325
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #1640"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 36.9% (MEDIUM) · Higher = larger blast radius
    36.9%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 14.6% · Safe to merge
    14.6%