Skip to content

Fix focus outline of block items in blocks menu#53929

Open
josephfusco wants to merge 2 commits intoWordPress:trunkfrom
josephfusco:53600-patch-1
Open

Fix focus outline of block items in blocks menu#53929
josephfusco wants to merge 2 commits intoWordPress:trunkfrom
josephfusco:53600-patch-1

Conversation

@josephfusco
Copy link

These changes clean up the outline styles for the blocks menu.

Fixes #53600

Demo of Proposed Changes

gutenberg-53600-solution.mov

@josephfusco josephfusco requested a review from ajitbohra as a code owner August 24, 2023 19:13
@github-actions
Copy link

github-actions bot commented Aug 24, 2023

Warning: Type of PR label mismatch

To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.

  • Type-related labels to choose from: [Type] Automated Testing, [Type] Breaking Change, [Type] Bug, [Type] Build Tooling, [Type] Code Quality, [Type] Copy, [Type] Developer Documentation, [Type] Enhancement, [Type] Experimental, [Type] Feature, [Type] New API, [Type] Task, [Type] Technical Prototype, [Type] Performance, [Type] Project Management, [Type] Regression, [Type] Security, [Type] WP Core Ticket, Backport from WordPress Core, Gutenberg Plugin.
  • Labels found: [Focus] Accessibility (a11y), First-time Contributor.

Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task.

@github-actions
Copy link

👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @josephfusco! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other.

If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Aug 24, 2023
@josephfusco
Copy link
Author

Hey @ajitbohra, thank you for taking a look at these changes!

The CSS proposed in this PR is causing some tests to fail. What can I do to help clear these?

@skorasaurus skorasaurus added the [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes). label Jan 16, 2024
@Mamaduka Mamaduka requested review from Mamaduka and t-hamano August 4, 2025 09:32
// Windows high contrast mode.
outline: 2px solid transparent;
outline-offset: 0;
border-radius: 2px;
Copy link
Member

Choose a reason for hiding this comment

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

This is a global change to the component. I think styling needs to be block-type item list specific.

Comment on lines -59 to +60
.edit-site-block-types-search {
.edit-site-block-types-search,
.edit-site-block-types-item-list {
Copy link
Contributor

@t-hamano t-hamano Aug 6, 2025

Choose a reason for hiding this comment

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

The block list doesn't need a bottom margin. Furthermore, taking this comment into account, the code should look like this:

.edit-site-block-types-search {
	margin-bottom: $grid-unit-10;
	padding: 0 $grid-unit-20;
}
.edit-site-block-types-item-list {
	padding: 0 $grid-unit-20;
}

.edit-site-block-types-item-list__item {
	border-radius: $radius-small;
}

Note that I added the edit-site-block-types-item-list__item className to this NavigationButtonAsItem component to make the button corners round:

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

Labels

First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Focus] Accessibility (a11y) Changes that impact accessibility and need corresponding review (e.g. markup changes).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Global Styles: Focus outline of block items is missing in Blocks menu

4 participants

Comments