Re: [csswg-drafts] [css-ui] Control whether an element is findable/searchable (Ctrl+F) (#3460)

Another motivating example:
 
I have a menubar with some options hidden behind a drop-down menu, which becomes visible on hover/focus. I still expose the options to the DOM (with `position: absolute; left: -9999px`) to allow users to tab through them and have them be part of the accessibility tree.
However, I don't want them to be searchable via Ctrl+F while they're not visible, as the search results would only confuse users.

I would not need a CSS property if I could automatically detect when the browser searches for text; then I could e.g. automatically show the drop-down menu. But this is not possible because search does not trigger a `select` event or similar.
I like the suggestion to make text with `user-select: none` not searchable but the current behavior in both Firefox and Chromium is that they *will* find text with `user-select: none`.

-- 
GitHub Notification of comment by stefanhamburger
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3460#issuecomment-1791387918 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 2 November 2023 19:05:32 UTC