"Find" finds invisible text. It shouldn't, should it?

When searching for text in a web page, Firefox currently also finds occurences of text invisible to the user, e.g. by means of CSS.

This is very irritating.

I propose to only consider text as found being rendered with at least 3*3 pixels in the event of the search being performed. This will also make sure the web page will be getting scrolled to the region where the text has been found.

Could you link to an example of this?

Sure.

Please visit https://abc.com/ and search for “good”.

(Will presumably only yield the expected (invisible) result for a short period of time.)

PS: Just to make sure: Preferred browser window width is 940 pixels. A wider browser window is alright but yields some visible results.

We probably use different “blockers”.

When I search good, there are two results in areas that are displayed persistently, and three in carousels. The carousels sometimes scroll to the match when I use next or previous on the Find bar and sometimes do not. When the carousel does not scroll, there is no explanation for where the match is.

This reminds me of some problems with Firefox finding matches in text that is styled away on other sites:

That’s why I suggest to check whether the caret surrounding a matching text is actually rendered (with 3*3 pixels at least). If it isn’t, I propose not to count that occurance as a hit.

Visible results should be listed separately from invisible results in the find bar, e.g. “1 of 2 visible matches (3 hidden matches found)”. The visible/invisible enumeration status text should be updated appropriately (either when DOM is updated or frequently once every 500 ms).

Optionally a checkbox could be added: |_| find visible matches only.

Is this the right place to suggest such feature? Or where would you suggest to shove my suggestion?

There must be a place where UI/UX people decide what they want for a feature. But I’m not sure what fora or lists they read.

I think it would be great if the found text could be scrolled into view or revealed in its hiding place rather than my having to do anything special.

Yes, that would be great. Yet, from a programmer’s point of view that wouldn’t be possible.

Imagine a text rendered with point size of 0.01 pt. You wouldn’t still see the result.

And a carousel is a proprietary implementation. Imagine a “hidden” panel to be positioned at -10,000;-10,000 pixels left and above the page’s dimensions. Or somewhere else beyond a clipped region. The browser couldn’t possibly go there.

That’s why I suggest to accept the fact that a page source may contain non-rendered text that should be omitted from find results because that’s not what the user is searching for. A note explaining that invisible occurances exist should suffice, I believe.