R248 Apply hover styles only where the pointer can hover

On by default

Put every hover style of a page under the media query (hover: hover) and (pointer: fine), so that it applies only where there is a fine pointer that can hover.

Reason

On a touch screen a tap sets the hover state and leaves it behind, so the element still looks as if it were under the pointer after the finger has gone, and the reader has to work out what the page is showing (Art. III).

Verification

A hover style is a style rule whose selector holds :hover, or its equivalent in the framework the site uses, such as a hover variant of a utility class.

Violated when a change adds or changes a hover style that applies outside (hover: hover) and (pointer: fine).

Provisions of the constitution it cites

Relations

Parent
R240 Frontend
Requires
none
Conflicts with
none

Metadata

ID
248
Revision
1
Kind
rule
Status
trial
Slug
frontend-hover-fine-pointer
Default level
project
Constitution revisions
>=1
Check
none
Default
on
Uses
Instructions instructions, Review review
Original language
English en
Translations
Chinese zh