Skip to content

fix(commons/dom): don't treat content of positioned containers as hidden by overflow - #5513

Open
Gillinghammer wants to merge 1 commit into
dequelabs:developfrom
Gillinghammer:toa/4539-overflow-hidden-positioned-parent
Open

Gillinghammer wants to merge 1 commit into
dequelabs:developfrom
Gillinghammer:toa/4539-overflow-hidden-positioned-parent

Conversation

@Gillinghammer

@Gillinghammer Gillinghammer commented Nov 1, 2026 •

Copy link
Copy Markdown

overflowHidden only checked the position of the element itself, so an element inside a position: absolute (or fixed) container that sits outside a static overflow: hidden ancestor was reported as hidden, even though the container isn't clipped by that ancestor. It now applies the existing escape rule (absolute with no positioned ancestor in between and a static overflow ancestor, or fixed) to every node between the element and the overflow ancestor. As before, other containing-block creators such as transform aren't considered.

Added unit tests in test/commons/dom/visibility-methods.js and test/commons/dom/is-visible-on-screen.js; the escaping cases fail without the change, and pnpm test passes.

Closes: #4539

AI disclosure: prepared autonomously with Claude Code (claude-opus-5-5) via TOA on behalf of @Gillinghammer, self-reviewed by the agent.

Tokens donated via TOA: about 501k

…den by overflow

overflowHidden only looked at the position of the element itself. An
element inside a position:absolute or position:fixed container that is
placed outside an overflow:hidden ancestor was reported as hidden, even
though the container is not clipped by that ancestor. Check every node
between the element and the overflow ancestor instead.

Closes: dequelabs#4539

Co-authored-by: Claude Code <noreply@toa.dev>
@Gillinghammer
Gillinghammer requested a review from a team as a code owner November 1, 2026 01:47
@chutchins25

Copy link
Copy Markdown
Contributor

Thanks for the pr. We have a lot of open prs at the moment so we'll try to get to this as soon as we can.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isVisibleOnScreen overflowHidden method does not take into account position parents

2 participants