Right now all position absolute tap targets are ignored by the audit so we don't falsely report failures where elements have the same x/y position but a different z-index. For example:

But ignoring them also misses real failures. To include them we need to detect whether an element is actually visible and we think we can use elementFromPoint to do that:
- we can treat a target as invisible if the topmost element at its center point isn't part of the tap target
- elementFromPoint only works within the current viewport, so we need to scroll through the page screen by screen in the gatherer
The axe gatherer already scrolls around the page, so that seems fine?
There might be a way to manually calculate if an element is in the top layer, but elementFromPoint seems easier to use and I think it would also allow us to get rid of filterClientRectsWithinAncestorsVisibleScrollArea.
@patrickhulce @brendankenny What do you think?
Right now all position absolute tap targets are ignored by the audit so we don't falsely report failures where elements have the same x/y position but a different z-index. For example:
But ignoring them also misses real failures. To include them we need to detect whether an element is actually visible and we think we can use elementFromPoint to do that:
The axe gatherer already scrolls around the page, so that seems fine?
There might be a way to manually calculate if an element is in the top layer, but
elementFromPointseems easier to use and I think it would also allow us to get rid offilterClientRectsWithinAncestorsVisibleScrollArea.@patrickhulce @brendankenny What do you think?