Skip to content

Accordion: Text in a closed accordion panel cannot be found via the browser search #73443

@hanneslsm

Description

@hanneslsm

Description

This issue came up in the WordPress Online Meetup DACH.

Content in a closed accordion panel is cannot be found via the browser search.
It does work in the details block, which opens automatically.

It might make sense to add hidden="until-found" attribute: https://developer.chrome.com/docs/css-ui/hidden-until-found

Step-by-step reproduction instructions

  1. Create an accordion and add text to accordion panel
  2. View the post
  3. Open the browser search with cmd+F
  4. Search for a word that is in the text in the panel

Screenshots, screen recording, code snippet

Editor Image

As you can see, you cannot find the text:
Image


It works in the details block:
Image

Environment info

No response

Please confirm that you have searched existing issues in the repo.

  • Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

  • Yes

Please confirm which theme type you used for testing.

  • Block
  • Classic
  • Hybrid (e.g. classic with theme.json)
  • Not sure

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] AccordionAffects the Accordion Block[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progress[Type] BugAn existing feature does not function as intended

    Type

    No type

    Projects

    Status

    📥 Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions