cvs-health / testaro

A thousand web accessibility tests performed by 11 tools
MIT License
29 stars 10 forks source link

Unhoverability needs more explanation #30

Closed jrpool closed 2 years ago

jrpool commented 2 years ago

A commentator requested a more complete explanation of unhoverability, as reported by the hover test, e.g., on siteimprove.com.

jrpool commented 2 years ago

The following additional explanation has been added to the comment at the beginning of the tests/hover file:

An element is reported as unhoverable when it fails the Playwright actionability checks for hovering, i.e. when it fails to be attached to the DOM, visible, stable (not or no longer animating), and able to receive events. All target candidates satisfy the first two conditions, so only the last two might fail. Playwright defines the ability to receive events as being the target of an action on the location where the center of the element is, rather than some other element with a higher zIndex value in the same location being the target.

The siteimprove.com home page is currently reported to have 83 unhoverable elements. One example is the “Products” button. It is humanly visible, but apparently is blocked initially by an element with zIndex value 10 covering the entire header. When it is so blocked, its normal hover behavior (border and cursor changes) does not occur during a hover.