Skip to content

Boot: Keep the sidebar Dashboard link readable on focus - #87419

Merged
ciampo merged 3 commits into
trunkfrom
t3/third-followup-draft-pr
Nov 26, 2026
Merged

ciampo merged 3 commits into
trunkfrom
t3/third-followup-draft-pr

Conversation

@ciampo

@ciampo ciampo commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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 trunk and 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:focus rule colored the focused label. On the default Fresh scheme it became #043959 on the dark sidebar, which is almost invisible. Modern used #183ad6, and the other schemes used #0096dd.

How?

The link now renders as ButtonLink from @wordpress/ui (minimal variant, neutral tone). ButtonLink already 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/ui neutral background tint and no longer turn the label to the brand color.

ButtonLink is not yet on the @wordpress/use-recommended-components allowlist, so the import carries a scoped suppression, as in widget-dashboard. The v1 site editor's Dashboard link already keeps its color on focus.

Testing Instructions

  1. Enable the Extensible Site Editor experiment in Gutenberg → Experiments.
  2. In Users → Profile, choose the Default admin color scheme.
  3. Open Appearance → Design.
  4. Tab to the Dashboard link at the top of the sidebar.
    • On trunk, the label turns dark blue (#043959) and is hard to read.
    • With this PR, the label stays light, and the link gets a subtle background tint and a focus ring.
  5. Hover the link. The label stays light, and the background tint appears.
  6. Repeat with other color schemes, such as Modern and Sunrise.

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 trunk at d3f8e19; after is this PR. Captured in Chromium at 1280 × 800, 2× scale.

Default (Fresh)

Before After
Fresh scheme before: the focused label turns dark navy and nearly disappears, and the hovered label turns light blue Fresh scheme after: the label stays light in all three states, with a background tint on focus and hover

Modern

Before After
Modern scheme before: the focused label turns dark blue on the dark sidebar Modern scheme after: the label stays light in all three states
Light, Blue, Coffee, Ectoplasm, Midnight, Ocean, and Sunrise
Before After
Light scheme before: the focused label turns light blue on the light sidebar Light scheme after: the label stays dark in all three states
Blue scheme before: the focused label turns a blue close to the sidebar color Blue scheme after: the label stays white in all three states
Coffee scheme before: the focused label turns blue Coffee scheme after: the label stays white in all three states
Ectoplasm scheme before: the focused label turns blue Ectoplasm scheme after: the label stays light in all three states
Midnight scheme before: the focused label turns blue Midnight scheme after: the label stays light in all three states
Ocean scheme before: the focused label turns blue Ocean scheme after: the label stays white in all three states
Sunrise scheme before: the focused label turns blue on the red sidebar Sunrise scheme after: the label stays white in all three states

Use of AI Tools

Claude Code found the cause, implemented the change, and captured the screenshots with Playwright against a local wp-env site. The author chose the ButtonLink approach.

🤖 Generated with Claude Code

ciampo and others added 2 commits November 25, 2026 22:51
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>
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

🤖 PR meta 🤖

Preview in WordPress Playground Preview in Storybook

🎉 Props

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ciampo <mciampini@git.wordpress.org>
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

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


Props Bot commands

You can trigger Props Bot actions by commenting on this PR:

  • @propsbot add <username> to give props to a GitHub user. Requires write access.
  • @propsbot remove <username> to leave a user out of the props. Requires write access.
  • @propsbot refresh to refresh this list. Adding the props-bot label works too.

Updated as activity occurs, without notifying anyone named here. Add the props-bot label to refresh.

📦 Bundle size

Size Change: +3.34 kB (+0.04%)

Total Size: 8.72 MB

📦 View Changed
Filename Size Change
build/modules/boot/index.min.js 55.1 kB +3.34 kB (+6.45%) 🔍

f54dcc8 Run

⚡ Performance

Show the results

Client side metrics exclude the server response time.

front-end-block-theme

Metric b9d2a5e trunk % Change
timeToFirstByte 57.75 ms +5.63% -4.85% 58.05 ms +4.05% -5.77% -0.52%
largestContentfulPaint 90 ms +2.22% -6.67% 90 ms +4.44% -4.44% 0%
lcpMinusTtfb 30.25 ms +4.63% -6.45% 31 ms +16.29% -5% -2.42%
wpBeforeTemplate 30.2 ms +9.24% -4.54% 29.75 ms +3.63% -3.93% 1.51%
wpTemplate 23.33 ms +2.61% -5.1% 23.34 ms +4.5% -3.73% -0.04%
wpTotal 53.7 ms +6.2% -4.79% 53.73 ms +3.15% -5.66% -0.06%
wpMemoryUsage 7.75 MB +0% -0% 7.72 MB +0% -0% 0.45%
wpDbQueries 16 +0% -0% 16 +0% -0% 0%

front-end-classic-theme

Metric b9d2a5e trunk % Change
timeToFirstByte 49.4 ms +2.02% -4.15% 46.75 ms +8.02% -1.18% 5.67%
largestContentfulPaint 84 ms +4.76% -0% 82 ms +4.88% -2.44% 2.44%
lcpMinusTtfb 37.1 ms +2.29% -6.2% 34.65 ms +3.17% -2.45% 7.07%
wpBeforeTemplate 27.38 ms +7.96% -2.92% 27.08 ms +7.02% -1.96% 1.11%
wpTemplate 17.12 ms +7.48% -2.34% 16.68 ms +3.84% -2.34% 2.64%
wpTotal 45.69 ms +3.26% -3.61% 43.65 ms +7.77% -1.01% 4.67%
wpMemoryUsage 6.44 MB +0% -0% 6.41 MB +0% -0% 0.56%
wpDbQueries 13 +0% -0% 13 +0% -0% 0%

media-processing

Metric b9d2a5e trunk % Change
mediaProcessingJpeg 411.56 ms +0.39% -0.98% 405.04 ms +1.42% -0.69% 1.61%
mediaProcessingAvif 6202.49 ms +0.26% -0.16% 6177.55 ms +0.17% -0.3% 0.4%
mediaProcessingJpegToAvif 4278.87 ms +0.28% -0.07% 4262.24 ms +0.34% -0.24% 0.39%

media-upload

Metric b9d2a5e trunk % Change
jpegUploadProcessing 2007.22 ms +1.87% -1.4% 1975.25 ms +1.25% -20.23% 1.62%
pngUploadProcessing 280.64 ms +3.4% -1.72% 273.88 ms +1.95% -0.43% 2.47%
largeJpegUploadProcessing 1952.67 ms +2.2% -21.43% 1984.99 ms +0.88% -22.93% -1.63%
multipleImageUploadProcessing 2093.66 ms +0.3% -0.46% 2062.53 ms +1.46% -0.68% 1.51%

post-editor

Metric b9d2a5e trunk % Change
serverResponse 331.27 ms +3.47% -3.57% 323.61 ms +1.29% -9.07% 2.37%
firstPaint 328.26 ms +0.76% -6.74% 316.9 ms +0.86% -2.23% 3.58%
domContentLoaded 639.86 ms +1.52% -0.41% 643.88 ms +2.19% -0.47% -0.62%
loaded 640.64 ms +1.52% -0.42% 644.7 ms +2.18% -0.46% -0.63%
firstContentfulPaint 369.63 ms +3.25% -3.45% 359.83 ms +1.61% -0.93% 2.72%
firstBlock 1715.51 ms +1.76% -2.17% 1747.12 ms +2.56% -2.13% -1.81%
type 15.19 ms +4.15% -10.6% 14.96 ms +3.81% -8.82% 1.54%
typeWithoutInspector 14.12 ms +11.97% -9.92% 15.64 ms +7.86% -9.21% -9.72%
typeWithTopToolbar 20.01 ms +5.85% -4.2% 20.01 ms +8% -8.8% 0%
typeContainer 6.47 ms +12.52% -7.11% 7.53 ms +12.22% -7.84% -14.08%
focus 87.46 ms +2.13% -4.95% 87.67 ms +3.24% -3.76% -0.24%
firstFocus 203.31 ms +0% -0% 227.95 ms +0% -0% -10.81%
selectAll 315.61 ms +8.42% -2.06% 299.79 ms +1.96% -0.04% 5.28%
undo 26.51 ms +5.88% -11.58% 24.17 ms +6% -5.09% 9.68%
listViewOpen 29.62 ms +3.81% -2.53% 32.71 ms +5.96% -8.84% -9.45%
inserterOpen 33.33 ms +4.2% -7.44% 31.9 ms +9.94% -6.21% 4.48%
inserterHover 10.39 ms +8.28% -7.31% 9.96 ms +4.72% -8.94% 4.32%
inserterSearch 6.75 ms +17.33% -2.67% 6.89 ms +5.95% -3.92% -2.03%
loadPatterns 520.73 ms +1.99% -1.31% 515.88 ms +2.66% -5.04% 0.94%
wpTotal 322.41 ms +3.56% -3.61% 315.07 ms +1.34% -9.39% 2.33%
wpMemoryUsage 14.81 MB +0% -0% 14.76 MB +0% -0% 0.33%
wpDbQueries 55 +0% -0% 55 +0% -0% 0%

site-editor

Metric b9d2a5e trunk % Change
serverResponse 254.48 ms +5.49% -10.53% 249.7 ms +1.44% -1.13% 1.91%
firstPaint 274.6 ms +11.86% -5.94% 286.82 ms +4.95% -9.04% -4.26%
domContentLoaded 547.05 ms +1.39% -3.37% 517.49 ms +0.68% -1.18% 5.71%
loaded 547.85 ms +1.37% -3.37% 518.14 ms +0.71% -1.14% 5.73%
firstContentfulPaint 307.85 ms +5.97% -1.68% 297.11 ms +2.62% -1.37% 3.61%
firstBlock 1670.01 ms +4.56% -3.05% 1599.95 ms +1.37% -1.02% 4.38%
type 12.24 ms +0.82% -14.22% 12.73 ms +3.85% -9.58% -3.85%
navigate 72.83 ms +7.19% -7.81% 75.7 ms +2.09% -4.25% -3.79%
loadPatterns 924.62 ms +12.18% -17.9% 857.49 ms +5.94% -3.03% 7.83%
loadPages 895.46 ms +3.96% -1.04% 899.55 ms +3.61% -2.08% -0.45%
wpTotal 248.23 ms +5.57% -10.85% 243.37 ms +1.43% -1.34% 2%
wpMemoryUsage 12.84 MB +0% -0% 12.80 MB +0% -0% 0.28%
wpDbQueries 45 +0% -0% 45 +0% -0% 0%

f54dcc8 Run

🏁 Flaky tests

Some 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 /test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts, passed after 1 failed attempt.
TimeoutError: locator.waitFor: Timeout 17500ms exceeded.
Call log:
  - waiting for getByRole('button', { name: /Collaborators list/ }) to be visible

    at map (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/fixtures/collaboration-utils.ts:193:7)
    at CollaborationUtils.waitForMutualDiscovery (/home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/fixtures/collaboration-utils.ts:188:10)
    at /home/runner/work/gutenberg/gutenberg/test/e2e/specs/editor/collaboration/collaboration-stress.spec.ts:416:28

f54dcc8 Run

@github-actions github-actions Bot added the [Package] Boot /packages/boot label Nov 25, 2026
@ciampo ciampo self-assigned this Nov 25, 2026
@ciampo ciampo added the [Type] Enhancement A suggestion for improvement. label Nov 25, 2026
@ciampo
ciampo marked this pull request as ready for review November 25, 2026 22:00
@github-actions
github-actions Bot requested a review from aduth November 25, 2026 22:00
@ciampo
ciampo requested review from a team and Mamaduka November 25, 2026 22:00
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Mamaduka Mamaduka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nice!

@ciampo
ciampo merged commit ca0f1f0 into trunk Nov 26, 2026
89 checks passed
@ciampo
ciampo deleted the t3/third-followup-draft-pr branch November 26, 2026 10:46
@github-actions github-actions Bot added this to the Gutenberg 24.6 milestone Nov 26, 2026
Vedant-Gandhi pushed a commit to Vedant-Gandhi/gutenberg that referenced this pull request Nov 30, 2026
)

* 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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Package] Boot /packages/boot [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants