Accessibility: Administration: Respect the prefers-reduced-motion media query for update icon spinner animations.

The update icon rotation should not occur when the user has opted to reduce motion, for example by selecting the "Reduce motion" option in macOS' preferences or unselecting "Show animations in Windows" in Windows' preferences.

Follow-up to [47813], [50027].

Props xkon, audrasjb, johnbillion.
Fixes #52263. See #51476.

git-svn-id: https://develop.svn.wordpress.org/trunk@50028 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov 2021-01-27 11:39:50 +00:00
parent 7a5a5a7939
commit fa1288d20c
2 changed files with 17 additions and 0 deletions

View File

@ -1539,6 +1539,17 @@ div.error {
animation: rotation 2s infinite linear;
}
@media (prefers-reduced-motion: reduce) {
.updating-message p:before,
.import-php .updating-message:before,
.button.updating-message:before,
.button.installing:before,
.plugins .column-auto-updates .dashicons-update.spin,
.theme-overlay .theme-autoupdate .dashicons-update.spin {
animation: none;
}
}
.theme-overlay .theme-autoupdate .dashicons-update.spin {
margin-right: 3px;
}

View File

@ -593,6 +593,12 @@ html:lang(he-il) .rtl #wpadminbar * {
animation: rotation 2s infinite linear;
}
@media (prefers-reduced-motion: reduce) {
#wpadminbar #wp-admin-bar-updates.spin .ab-icon:before {
animation: none;
}
}
/**
* Search
*/