dequelabs / dequelabs/axe-core

target-size rule should support position:sticky

Open
#3,720 0 comments 0 reactions 0 assignees View on GitHub
color contrast core fix target-size
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 23h
Merged PRs (30d)
17

Description

Currently the `target-size` rule treats elements with `position: stricky` as though they have position:relative. This could in theory result in false positives when the page is scrolled. I think the best solve for this would be to try and work out the original position of the sticky element and use that as its place in `axe._grid`, rather than its current position.

In this, we may also want to revisit how `position: fixed` elements are calculated. Those too have this issue. We have exception code in color-contrast and target-size to try and avoid false positives from them, but I think there's probably a better / more reliable solution if we adjusted how the grid worked.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.