You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Accordion: Text in a closed accordion panel cannot be found via the browser search #73443
There may be another technical approach, but it would be a somewhat hacky approach. In any case, we think this is something that needs a bit more research to address in the 6.9 release, so let's punt it to 7.0.
Given that Chrome, Firefox, and Edge already support it, and Safari is about to, it may not be necessary to wait for WordPress 7.0 solely because of Safari support.
Hi, I’d like to work on this issue. I think the problem is in accordion-panel, where CSS hides the content and breaks browser search. My approach would be to add hidden="until-found" to the panel content — is this the right way to fix it?
Thanks!
Hi, I followed the solution suggested by @t-hamano
I have opened a PR to fix this - #74744
I also went through the article referred by @ddryo, and I feel we should also make role="region" attribute dynamic for better accessibility. Here is PR incorporating those changes as well - #74747
Hi, I'm a theme developer who encountered a related issue while implementing open/close animations for the Accordion block.
The current display: none used to hide closed panels also prevents CSS transitions from working. Since you can't animate from display: none, I had to work around it by overriding display: none with CSS and controlling the panel height via JavaScript (scrollHeight → height: 0 with a CSS transition).
This workaround functions, but it adds extra JavaScript that wouldn't be necessary if the panel visibility were handled differently at the core level.
If hidden="until-found" is adopted to address the browser search issue, it would likely resolve the animation limitation as well, since theme developers would no longer need to fight against display: none. That would be a great improvement for theme customization.
Just wanted to share this perspective as additional context for why resolving the underlying display: none approach matters beyond just browser search functionality.
Activity
[-]Accordion:[/-][+]Accordion: Text in a closed accordion panel cannot be found via the browser search[/+]luminuu commentedon Nov 19, 2025
Can confirm this on a local install with 6.9 RC2.
t-hamano commentedon Nov 23, 2025
Thanks for the suggestion.
Unfortunately,
hidden="until-found"doesn't seem to be supported in Safari yet: https://caniuse.com/?search=hidden%3Duntil-foundThere may be another technical approach, but it would be a somewhat hacky approach. In any case, we think this is something that needs a bit more research to address in the 6.9 release, so let's punt it to 7.0.
brnhrst commentedon Nov 24, 2025
hidden="until-found" is already available in the Safari 26.2 beta:
https://developer.apple.com/documentation/safari-release-notes/safari-26_2-release-notes#DOM
Given that Chrome, Firefox, and Edge already support it, and Safari is about to, it may not be necessary to wait for WordPress 7.0 solely because of Safari support.
t-hamano commentedon Jan 6, 2026
Since
hidden="until-found"should be supported in all major browsers now, it might be worth addressing this issue in 7.0.harshbhonsle commentedon Jan 7, 2026
Hi, I’d like to work on this issue. I think the problem is in
accordion-panel, where CSS hides the content and breaks browser search. My approach would be to addhidden="until-found"to the panel content — is this the right way to fix it?Thanks!
5 remaining items
ddryo commentedon Jan 13, 2026
Although the article is in Japanese, there is a post that provides a detailed summary of implementing accordions using hidden="until-found".
https://css-notes.com/ui/accordion-with-wai-aria
SohamPatel46 commentedon Jan 19, 2026
Hi, I followed the solution suggested by @t-hamano
I have opened a PR to fix this - #74744
I also went through the article referred by @ddryo, and I feel we should also make role="region" attribute dynamic for better accessibility. Here is PR incorporating those changes as well - #74747
hikari-kato commentedon Feb 20, 2026
Hi, I'm a theme developer who encountered a related issue while implementing open/close animations for the Accordion block.
The current display: none used to hide closed panels also prevents CSS transitions from working. Since you can't animate from display: none, I had to work around it by overriding display: none with CSS and controlling the panel height via JavaScript (scrollHeight → height: 0 with a CSS transition).
This workaround functions, but it adds extra JavaScript that wouldn't be necessary if the panel visibility were handled differently at the core level.
If hidden="until-found" is adopted to address the browser search issue, it would likely resolve the animation limitation as well, since theme developers would no longer need to fight against display: none. That would be a great improvement for theme customization.
Just wanted to share this perspective as additional context for why resolving the underlying display: none approach matters beyond just browser search functionality.
Mamaduka commentedon Feb 20, 2026
I think we can go with the
hidden="until-found"solution and acknowledge the problem with Safari. The fix in Firefox should ship next week - https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/148.t-hamano commentedon Mar 26, 2026
Since we are now in the 7.0 RC phase, let's postpone this issue to 7.1.