Skip to content

fix: restore admin bar contrast in Light scheme - #274

Open
akira-in-tech wants to merge 5 commits into
WordPress:mainfrom
akira-in-tech:agent/fix-light-scheme-contrast
Open

fix: restore admin bar contrast in Light scheme#274
akira-in-tech wants to merge 5 commits into
WordPress:mainfrom
akira-in-tech:agent/fix-light-scheme-contrast

Conversation

@akira-in-tech

@akira-in-tech akira-in-tech commented Aug 12, 2026

Copy link
Copy Markdown

Summary

  • add a Light admin color scheme override for the presence count, secondary labels, and screen descriptions
  • use WordPress gray #50575e, which provides a 7.33:1 contrast ratio against the Light scheme's white submenu
  • add a Playwright regression test that checks the rendered foreground and effective background colors for WCAG AA contrast

Root cause

The presence admin bar styles used #a7aaad for secondary text regardless of the selected WordPress admin color scheme. That color works against the default dark submenu, but the Light scheme uses a white submenu and also gives the top-level count a low-contrast inherited color.

The override is scoped to .admin-color-light, so the existing appearance of the other admin color schemes is unchanged.

Fixes #266

Validation

  • ./vendor/bin/phpcs --standard=phpcs.xml.dist
  • ./vendor/bin/phpstan analyse --configuration=phpstan.neon.dist --memory-limit=2G
  • npm run test:scripts — 54 passed
  • npm test — 186 tests, 415 assertions, 5 skipped
  • npm run test:e2e — 16 passed

The local wp-env run used WP_ENV_CORE=WordPress/WordPress#7.0.3 because the current latest-version resolver requested the not-yet-available 7.0.4 Git ref. The four wp-env-backed jobs fail before test execution for the same reason on the latest main run.

Use of AI Tools

AI assistance: Yes
Tool(s): OpenAI Codex
Model(s): GPT-5
Used for: Implementation and regression-test drafting; the final diff and validation results were reviewed by the contributor.

@github-actions

github-actions Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

▶ Preview in WordPress Playground

Open in WordPress Playground

Boots a fresh WordPress with this PR's presence-api build, seeds 5 demo users, and drops you on the dashboard.

Stress-test variant: 40 demo users · Built from 4376e2e57be4e95d7e247674be188730e8549cfc. Auto-updates when you push.

@akira-in-tech

Copy link
Copy Markdown
Author

Visual verification

Validated the PR build in the generated WordPress Playground preview.

  • Fresh: existing dark submenu styling remains unchanged and all secondary labels remain legible.
  • Light: the count, group headings, (you) label, and screen descriptions render clearly against the white submenu.
  • The dropdown remains aligned and all five seeded users are visible without clipping.

Fresh

Fresh admin bar presence menu

Light

Light admin bar presence menu

The computed Light-scheme text color is rgb(80, 87, 94) (#50575e) against rgb(255, 255, 255), a 7.33:1 contrast ratio.

@akira-in-tech
akira-in-tech marked this pull request as ready for review August 12, 2026 19:29
@github-actions

Copy link
Copy Markdown
Contributor

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Unlinked Accounts

The following contributors have not linked their GitHub and WordPress.org accounts: @akira-in-tech.

Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases.

Core Committers: Use this line as a base for the props when committing in SVN:

Props joefusco.

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@josephfusco josephfusco left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hey @akira-in-tech, thank you for working on this. Confirmed this resolves the contrast issue.

One thing: please link a WordPress.org account so you get proper credit when this ships.

@josephfusco josephfusco added [Type] Bug An existing feature is broken [Area] Admin UI Issues for the admin UI integrations php Pull requests that update php code Needs WP.org Link Author hasn't linked a WordPress.org account yet — confirm before merging so props credit correctly labels Aug 14, 2026
@akira-in-tech

Copy link
Copy Markdown
Author

Thanks for confirming the fix and for the attribution reminder. I’ll take care of linking my WordPress.org account so the contribution is credited correctly.

@josephfusco josephfusco added the props-bot Manually runs the Props Bot to update the contributor list. label Aug 14, 2026
@github-actions github-actions Bot removed the props-bot Manually runs the Props Bot to update the contributor list. label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Area] Admin UI Issues for the admin UI integrations Needs WP.org Link Author hasn't linked a WordPress.org account yet — confirm before merging so props credit correctly php Pull requests that update php code [Type] Bug An existing feature is broken

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin bar flyout text fails contrast in the Light color scheme

2 participants