Skip to content

Idea: using Element checkVisibility() as a new displayCheck optionΒ #1800

@fpapado

Description

@fpapado

Hi! First of all, thanks for maintaining this library, I know it's a lot of work to keep up with browsers 😌

I was looking into this library because it is part of our app's dependency tree. Elsewhere in our our app, we have a custom implementation of checking for sequentially and programatically focusable elements, that has run into similar cases as this library.

Our implementation was written with contemporary browsers in mind, so many of the visibility checks are done via Element checkVisibility(), modulo some shortcuts/fast paths. We've found that it catches most of the edge cases (including visibility, opacity, as well as the auto state of content-visibility).

Would you consider a displayCheck option that utilises this method, instead of (or, progressively enhancing) the current bespoke visibility checks? I'd be happy to contribute and help the tests pass πŸ”§

Browser support is quite recent (~March 2024, for Safari 17.4), so my first hunch is to use this as a progressive enhancement.

Let me know what you think!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions