Bug 238266
Summary: | Implement hidden=until-found HTML attribute and beforematch event | ||
---|---|---|---|
Product: | WebKit | Reporter: | Joey Arhar <jarhar> |
Component: | DOM | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | 709922234, bogdan.brinza, cdumez, cyb.ai.815, koivisto, lwarlow, m.goleb+bugzilla, mike, ntim, oliver.byford, schaepp, simon.fraser, thaivu100186, webkit-bug-importer, webkit, zalan |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Bug Depends on: | 290369 | ||
Bug Blocks: |
Joey Arhar
This feature was added to the HTML spec here: https://github.com/whatwg/html/pull/7475
Here is an explainer: https://github.com/WICG/display-locking/blob/main/explainers/hidden-content-explainer.md
The "until-found" value for the hidden attribute should make the element content-visibility:hidden instead of display:none. When the browser searches for text via find-in-page or ScrollToTextFragment, it should also search for text in hidden=until-found elements. If find-in-page or ScrollToTextFragment want to scroll to a match inside a hidden=until-found element, it should remove the hidden attribute from the element and fire the "beforematch" event on it in order to reveal the match.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/90706206>
Michał Gołębiowski-Owczarek
As stated in https://bugzilla.mozilla.org/show_bug.cgi?id=1761043, Wikipedia uses this attribute now, which means find in page works much better in Chrome on Android than on iOS. This is something I am hitting on a daily basis as an iOS user.
Tim Nguyen (:ntim)
Bug 228843 can probably be used as inspiration if someone wants to hack this.
Christian "Schepp" Schaefer
I've found one more use case where hidden=until-found is very helpful which I described here: https://schepp.dev/posts/rethinking-find-in-page-accessibility-making-hidden-text-work-for-everyone/
I'm aware that this feature is part of Interop 2025 via <details> element, but maybe we can get this quicker than end of this year?