Repository navigation
Boot: Keep the sidebar Dashboard link readable on focus - #87419
Conversation
The admin color scheme's `a:focus` color overrode the label of the v2 sidebar's Dashboard link, for example `#183ad6` on the dark Modern sidebar. Render the link with `ButtonLink` from `@wordpress/ui`, which defends against wp-admin's global link styles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: +3.34 kB (+0.04%) Total Size: 8.72 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. three users concurrently edit a large post with diverse blocks in
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
) * Boot: Keep the sidebar Dashboard link readable on focus The admin color scheme's `a:focus` color overrode the label of the v2 sidebar's Dashboard link, for example `#183ad6` on the dark Modern sidebar. Render the link with `ButtonLink` from `@wordpress/ui`, which defends against wp-admin's global link styles. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Boot: Add changelog entry for WordPress#87419 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Boot: Clarify the Dashboard link changelog entry Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Follow-up to #86614, which lists this fix as its third follow-up. Depends on #86614: please merge that PR first. This change applies cleanly to
trunkand does not need code from it.What?
Keep the Dashboard link at the top of the extensible site editor's sidebar readable when it has keyboard focus.
Why?
The admin color scheme's
a:focusrule colored the focused label. On the default Fresh scheme it became#043959on the dark sidebar, which is almost invisible. Modern used#183ad6, and the other schemes used#0096dd.How?
The link now renders as
ButtonLinkfrom@wordpress/ui(minimal variant, neutral tone).ButtonLinkalready defends against wp-admin's global link styles, so the label keeps the WPDS neutral foreground color in every state. Hover and focus show the@wordpress/uineutral background tint and no longer turn the label to the brand color.ButtonLinkis not yet on the@wordpress/use-recommended-componentsallowlist, so the import carries a scoped suppression, as inwidget-dashboard. The v1 site editor's Dashboard link already keeps its color on focus.Testing Instructions
trunk, the label turns dark blue (#043959) and is hard to read.Testing Instructions for Keyboard
Follow step 4, then press Enter. The Dashboard should open. The link keeps its accessible name, "Go to the Dashboard".
Screenshots or screencast
Each image shows the link at rest, with keyboard focus, and on hover, from left to right. Before is
trunkatd3f8e19; after is this PR. Captured in Chromium at 1280 × 800, 2× scale.Default (Fresh)
Modern
Light, Blue, Coffee, Ectoplasm, Midnight, Ocean, and Sunrise
Use of AI Tools
Claude Code found the cause, implemented the change, and captured the screenshots with Playwright against a local
wp-envsite. The author chose theButtonLinkapproach.🤖 Generated with Claude Code