Skip to content

Fix invisible text on highlighted sidebar rows in dark themes - #171

Open
ThePhatLeee wants to merge 2 commits into
Frewacom:masterfrom
ThePhatLeee:fix/sidebar-highlight-text-contrast
Open

Fix invisible text on highlighted sidebar rows in dark themes#171
ThePhatLeee wants to merge 2 commits into
Frewacom:masterfrom
ThePhatLeee:fix/sidebar-highlight-text-contrast

Conversation

@ThePhatLeee

@ThePhatLeee ThePhatLeee commented Jul 27, 2026

Copy link
Copy Markdown

Problem

sidebar_highlight_text is mapped to PaletteColors.TextFocus, while sidebar_highlight (the background it renders on top of) is PaletteColors.AccentPrimary. In a dark theme where the accent color is light or bright (a common case, since accent colors are meant to stand out against a dark background), textFocus is typically also a light color for readability elsewhere against the main dark background. Pairing two light colors together makes the text on a highlighted sidebar row nearly invisible.

Confirmed live against a real themed Thunderbird profile (Noctalia palette, via pywalfox-native): accentPrimary is rgb(255,245,155) and textFocus is rgb(255,255,255), a roughly 1.05:1 contrast ratio (WCAG requires 4.5:1+ for normal text) on any highlighted row in a built-in sidebar, for example Thunderbird's Calendars list or a selected folder in the folder tree.

Fix

The two directly analogous pairs already get this right. Both popup_highlight_text and toolbar_field_highlight_text (dark) use PaletteColors.Background against the same AccentPrimary highlight background, which is the correct dark-on-light pairing. sidebar_highlight_text was the one outlier still using TextFocus instead of Background, for both light and dark themes since it lives in the shared BASE_BROWSER_TEMPLATE.

One-line fix: change sidebar_highlight_text from PaletteColors.TextFocus to PaletteColors.Background.

Screenshot

The Calendars sidebar in Thunderbird, after the fix — solid AccentPrimary highlight with Background-colored text, clearly readable instead of near-invisible:

Sidebar highlight after fix

Testing

Existing test suite (12/12) and eslint both pass unchanged. This only touches a template mapping, not logic.

sidebar_highlight_text was mapped to PaletteColors.TextFocus, while
sidebar_highlight (the background it sits on) is PaletteColors.AccentPrimary.
In a dark theme where the accent color is light/bright (a common case, since
accentPrimary is meant to stand out), textFocus is also typically a light
color for readability against the main dark background elsewhere, so pairing
two light colors together makes the text on a highlighted sidebar row nearly
invisible.

Confirmed live against a Noctalia-themed Thunderbird profile: accentPrimary
rgb(255,245,155) with textFocus rgb(255,255,255) gives a roughly 1.05:1
contrast ratio (WCAG requires 4.5:1+ for normal text) on any highlighted row
in a built-in sidebar, for example Thunderbird's Calendars list or folder
tree selection.

The two directly analogous pairs already get this right: popup_highlight_text
and toolbar_field_highlight_text (dark) both use PaletteColors.Background
against the same AccentPrimary highlight background, which is exactly the
dark-on-light pairing needed. sidebar_highlight_text was the one outlier
still using TextFocus instead of Background, for both light and dark themes
since it lives in the shared BASE_BROWSER_TEMPLATE.

Verified: existing test suite (12/12) and eslint both pass unchanged.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@ThePhatLeee
ThePhatLeee force-pushed the fix/sidebar-highlight-text-contrast branch from 7e7f33b to 32337c2 Compare July 27, 2026 17:46
@ThePhatLeee
ThePhatLeee marked this pull request as ready for review July 27, 2026 17:54
Copilot AI review requested due to automatic review settings July 27, 2026 17:54

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants