Skip to content

[css-highlight-api] Should highlightsFromPoint exclude obscured content? #11770

@ffiori

Description

@ffiori

Currently highlightsFromPoint doesn't specify if it should return custom highlights that are obscured by other elements. Right now the implementation doesn't return any highlights if they're obscured, but I'm opening this issue in case there's strong arguments about it before updating the spec.

It doesn't seem intuitive at first sight to return them if they're behind another element because you wouldn't expect the highlights to react to for example hovering over them or clicking on them if there's another thing on top. Think of a spelling error that's highlighted but there's a translucent rectangle box on top of it, it doesn't sound like the highlight should react to the mouse moving over it. I can't think of any use cases where returning obscured highlights could be useful.

See this example https://jsfiddle.net/16qagcw4/1/

This issue came up on a discussion in the intent to ship for highlightsFromPoint, see https://groups.google.com/a/chromium.org/g/blink-dev/c/8OpfR1m_zjU/m/n-62BUBpAgAJ

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions