Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose an API to get the top layer element #8783

Open
straker opened this issue Jan 26, 2023 · 0 comments
Open

Expose an API to get the top layer element #8783

straker opened this issue Jan 26, 2023 · 0 comments

Comments

@straker
Copy link

straker commented Jan 26, 2023

This is similar to #897, but specifically what I'm after is a subset of the proposed api from that ticket. With Chrome, Firefox, and Safari all implementing the <dialog> element, and with Chrome exposing the "top layer" in the DevTools, I would love a JavaScript API to get access to the element that is the "top layer." As far as I can tell, there is no such API exposed (on either the <dialog> element itself or the document).

Reasoning

As a maintainer of an accessibility library (axe-core), I need a way to determine what the "top layer" element is in order to determine how things on the page should be treated for accessibility. Specifically, I need to know what elements on the page should be treated as inert and which shouldn't. Since all elements outside of the "top layer" element are intrinsically treated as inert by the browser without using the inert attribute or property, I'm unable to determine programmatically when an element is inert.

Notes

  • This ticket is just asking for a way to get the element that is "top layer." It is not asking about more API methods than that (such as exposing the entire stack, or methods to manipulate the stack).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant