From f89b77b9e8185aa29b131d4b5931dea97847105d Mon Sep 17 00:00:00 2001 From: novykh Date: Thu, 24 Sep 2026 17:27:21 +0300 Subject: [PATCH 1/2] Show a keyboard focus ring on Button and respect reduced motion in loaders Button removed the outline on every focus, so keyboard users could not see where focus was. Add a :focus-visible ring using textFocus. Stop the loading spinner animation when prefers-reduced-motion is set. --- .../button/__snapshots__/button.test.js.snap | 79 +++++++++++++++++++ src/components/button/button.test.js | 19 +++++ src/components/button/styled.js | 10 +++ src/components/icon/components/loader.js | 5 ++ src/components/icon/components/loader.test.js | 19 +++++ 5 files changed, 132 insertions(+) create mode 100644 src/components/icon/components/loader.test.js diff --git a/src/components/button/__snapshots__/button.test.js.snap b/src/components/button/__snapshots__/button.test.js.snap index 0803ead2b..be1f369cf 100644 --- a/src/components/button/__snapshots__/button.test.js.snap +++ b/src/components/button/__snapshots__/button.test.js.snap @@ -56,6 +56,11 @@ exports[`Borderless Button renders 1`] = ` outline: none; } +.c0.c0:focus-visible { + outline: 2px solid #4A5757; + outline-offset: 2px; +} + .c0.c0 .button-icon { height: 14px; width: 14px; @@ -76,6 +81,13 @@ exports[`Borderless Button renders 1`] = ` stroke: #00AB44; } +@media (prefers-reduced-motion:reduce) { + .c0.c0 .ntd-spinner { + animation: none; + stroke-dashoffset: 0; + } +} +