Review main Merged

76403[BUGFIX] Respect prefers-reduced-motion for notifications

Andreas Kienast CR +2 V +2 Easy +3 −2 updated 11/03/22, 18:58

Commit message

Most modern operating systems allow to disable animations, also known
as "reduced motion", which is a very important accessibility feature
for people suffering from motion sickness.

In CSS Level 5, a media query `prefers-reduced-motion` is available to
check for this specific setting, if the browser can get the
configuration from the operating system (looking at you, Chrome and
GNOME).

With Bootstrap 5, `prefers-reduced-motion` is already in place,
disabling all animations caused by CSS. However, the notification
component is partially animated via JavaScript and thus the media query
wasn't taken into consideration and notifications were still animated.

The media query is now checked on JavaScript side as well to avoid
animating notifications.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
    • Markus Klein +1
    • Anja Leichsenring +1
    • Lina Wolf +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Anja Leichsenring +1
    • Lina Wolf +1
    • core-ci +1 CI

Issues 1

Files 2

Review log 78

  1. Andreas Kienast uploaded patch set 1 11/03/22, 15:03

  2. Andreas Kienast wrote 11/03/22, 15:05

    Topic set to a11y
  3. core-ci voted on patch set 1 V +1 11/03/22, 15:11 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/33053

  4. Markus Klein voted on patch set 1 CR +1 11/03/22, 15:23

  5. Anja Leichsenring voted on patch set 1 V +1 CR +1 11/03/22, 18:45

  6. Lina Wolf commented on patch set 1 V +1 CR +1 11/03/22, 18:48

    Code looks good to me, and it works in my browser (Chrome)
  7. Stefan Bürk voted on patch set 1 V +2 CR +2 11/03/22, 18:58

  8. Stefan Bürk merged patch set 2 11/03/22, 18:58