Skip to content

Editor: restore the behavior of only showing back button focus ring on :focus-visible#80114

Open
fushar wants to merge 1 commit into
trunkfrom
fix-editor-back-button-focus-visible
Open

Editor: restore the behavior of only showing back button focus ring on :focus-visible#80114
fushar wants to merge 1 commit into
trunkfrom
fix-editor-back-button-focus-visible

Conversation

@fushar

@fushar fushar commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

What?

In #48472 we only show the focus ring for editor sidebar back button on :focus-visible only. Then #80029 removes that behavior by mistake (sorry!). This PR reintroduces the behavior, but not by reverting as-is and instead proposing a simpler CSS. So in the end we still get a cleaner CSS in the file 😄

Testing Instructions

  1. Go to Site Editor.
  2. Click Pages (via mouse).
  3. Verify the chevron back button (< Pages) doesn't get focused (you don't see focus ring).

Use of AI Tools

Used Opus 4.8 to brainstorm solutions.

@fushar fushar requested a review from a team July 10, 2026 14:30
@github-actions

github-actions Bot commented Jul 10, 2026

Copy link
Copy Markdown

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.

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: fushar <fushar@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>

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

@github-actions github-actions Bot added the [Package] Edit Site /packages/edit-site label Jul 10, 2026
@fushar fushar added the [Type] Bug An existing feature does not function as intended label Jul 10, 2026
@github-actions

Copy link
Copy Markdown

Size Change: +39 B (0%)

Total Size: 7.69 MB

📦 View Changed
Filename Size Change
build/styles/edit-site/style-rtl.css 21.3 kB +10 B (+0.05%)
build/styles/edit-site/style-rtl.min.css 17.5 kB +9 B (+0.05%)
build/styles/edit-site/style.css 21.3 kB +11 B (+0.05%)
build/styles/edit-site/style.min.css 17.5 kB +9 B (+0.05%)

compressed-size-action

@fushar fushar marked this pull request as draft July 10, 2026 14:55
@fushar fushar marked this pull request as ready for review July 10, 2026 14:56
@github-actions

Copy link
Copy Markdown

Flaky tests detected in 6b18e98.
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.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/29100080783
📝 Reported issues:

@t-hamano t-hamano left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for the PR!

The current behavior is not strictly a bug, as it is based on a design system decision to prioritize the use of :focus over :focus-visible. However, I understand the feedback that it is bothersome to see the focus ring appear every time you move across the screen.

For now, I think we can ship this PR to restore the previous behavior.

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

Labels

[Package] Edit Site /packages/edit-site [Type] Bug An existing feature does not function as intended

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants