Skip to content

a11y/reduced-motion: a library's own reduced-motion block (Font Awesome 6) should not mark the whole page as handled #2111

Closed

Description

@nc9

a11y/reduced-motion (#2050) treats any @media (prefers-reduced-motion…) rule on the page as handling for the whole page. Font Awesome 6's own stylesheet ships such a rule for its icon animations, so a page that loads Font Awesome 6 passes even when it has unrelated motion with no reduced-motion handling (a <marquee>, an infinite CSS animation on its own elements, a looping autoplay video). Found by the Opus confirm review of pub#2050; the false negative predates that PR's fix round.

Acceptance Criteria

  • A reduced-motion rule counts as handling only for the motion it actually covers: the selectors inside the @media (prefers-reduced-motion: reduce) block, or a global reset (*, html, body, :root with animation/transition durations reduced).
  • A page with Font Awesome 6 CSS plus an infinite animation on its own element and no other handling warns.
  • A page with a global reduced-motion reset still passes.
  • Tests cover both cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrulessize: S

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions