Closed bokand closed 4 years ago
That sounds good.
I'm looking at the draft specification and not seeing any mention of transparent elements. Is it the case that the text content of script
et al are included in the search, or is there a reference to visible text somewhere that encompasses the notion of skipping these elements?
I think transparent elements shouldn't be matched (not scrolled or indicated in any way). I'll be sure to include this case when clarifying hidden text matching in the spec. Thanks!
I think we've since settled that display-locking will be a more reliable way to deal with things like expandos (and the experimental display-locking implementation already works with text fragments!) so hacking in special-cases for hidden->unhidden elements as I mention at the top seems not worth the cost.
The behavior we've found useful is that
visibility:hidden
ordisplay:none
text that we find in the DOM should be matched but not scrolled into view. That way, if the page makes it visible after load it is indicated.One use case we're thinking of here is mobile Wikipedia. If the link has a classic element-id fragment so that it expands a section based on page script, we want the highlight to still appear. In these cases, we don't want to scroll-into-view though.
We need to make sure this is precisely specified.