Closed HelenFoster closed 3 years ago
user-select
is an interesting case. In typical cases, user-select: none
should indicate that the text should be ignored. However, it may still be useful to scan such text, so disabling it entirely may not be optimal. (There is a similar difficulty with the CSS content
attribute, which currently is never scanned.)
However, in the case of the satorireader.com URL you linked, the user-select: none
style is combined with color: transparent
, which I think we can be 99% certain that the element should be ignored when scanning. The scanning algorithm already ignores other non-visible elements, so I think this combination of styles should also qualify as non-visible.
This particular case will be resolved by #286.
This has come up on Satori Reader recently ( e.g. https://satorireader.com/articles/sanzu-no-kawa-episode-1-edition-m ), where they added "訳" and "再" to the inline "notes" and "play" buttons, and Yomichan is sending them to Anki along with the sentence.
If I select a block of text in the browser and copy-and-paste it, the button text doesn't get copied. Checking the CSS on those buttons for the reason, I found this:
Would it make sense to avoid grabbing non-selectable text? I'm not sure what this CSS feature is normally used for, and whether this use is typical.