Skip to content

Explain access-type badges are unreadable in the light theme #849

Closed

Description

@EVWorth

Severity: P2 (accessibility: contrast).

What happens

On http://localhost:1420/?mock=connected in the light theme (at 1024×680):

  1. Run Explain on SELECT * FROM orders o JOIN customers c ON c.id = o.customer_id WHERE o.total > 100.
  2. In the plan table and the tree view, the ALL badge (the worst access type, the one users most need to notice) is white text on a pale pink tint, and is barely legible.
  3. eq_ref, ref_or_null, index, index_merge and range are white on pale green or amber tints, and equally faint. The same chips appear in the "Access type" legend.
  4. At 1024px the legend runs off the right edge of the panel (the last chip is cut to "fullte…").

Cause

src/components/explain/ExplainPanel.tsx:17-31 pairs surface-error-strong / surface-warning-strong / surface-success-strong with text-white. Those classes are translucent banner tints (src/styles/globals.css:124-130), and in the light theme they are pale.

Fix

Use solid, theme-aware badge tokens whose foreground meets WCAG AA in both themes (or use the status colour as the text on the tint). Let the legend wrap with flex-wrap.

Part of #783.

Activity

  1. added
    bug
    on Oct 21, 2026
  2. added a commit that references this issue on Oct 29, 2026
    85097fe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions