Skip to content

Search field with the button inside has no visible focus state #140

Closed

Description

@MaggieCabrera

What happened?

When the search block has the button inside the field, the field has no visible focus state. Focused and unfocused look exactly the same, so keyboard users can't tell they're in it (WCAG 2.4.7, Focus Visible).

Core removes the input's outline in this layout:

:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus { outline: none; }

The theme's core/search styles in theme.json give .wp-block-search__inside-wrapper a border change on hover, but nothing on focus. A :focus-within style on the wrapper would bring a focus state back.

Where does it happen?

On the site (front end)

It affects the two places that use the button-inside search: the Search template (hidden-search) and Overlay Contents.

Steps to reproduce

  1. Go to a search results page, for example /?s=hello.
  2. Press Tab until the search field has focus.
  3. Compare it with the field when it isn't focused: nothing changes.

Screenshots or screen recording

No response

WordPress version

7.1.3

PHP version

8.3

Ipsum version

trunk

Gutenberg plugin version

24.1.0

Browser and device

Chrome on macOS

Before you submit

  • I searched the existing issues and this bug hasn't been reported yet.

Related: #44 (keyboard navigation in the accessibility-ready review) and #90 (layout shift when the search button is focused).

Activity

  1. added
    [Type] Bug
    [Focus] Accessibility (a11y)
    on Oct 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Focus] Accessibility (a11y)[Type] Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions