Commit 6dc3cf2
authored
Reduce motion for arrow key scrolling in Carousel (#1549)
Implement reduced motion preferences for users when scrolling with arrow
keys in the Carousel component, enhancing accessibility for those who
prefer less motion.
The component now respects reduced motion when both using the arrow
buttons and arrow keys. For regular scrolling/swiping it still does not.
This would require some advanced tweaking and it isn't strictly
required: *"For example, if scrolling a page causes elements to move
(other than the essential movement associated with scrolling the
content, which is under the user's control)"*
(https://www.w3.org/WAI/WCAG22/Techniques/css/C39). Scrolling or swiping
left/right in the `Carousel` is under the users control. And users with
a reduced motion preference can avoid this by using the arrow
buttons/keys.1 parent 37ca479 commit 6dc3cf2
File tree
2 files changed
+43
-3
lines changed- .changeset
- packages/react/src/carousel
2 files changed
+43
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
272 | 272 | | |
273 | 273 | | |
274 | 274 | | |
| 275 | + | |
| 276 | + | |
275 | 277 | | |
276 | 278 | | |
277 | 279 | | |
| |||
370 | 372 | | |
371 | 373 | | |
372 | 374 | | |
| 375 | + | |
| 376 | + | |
373 | 377 | | |
374 | 378 | | |
375 | 379 | | |
| |||
378 | 382 | | |
379 | 383 | | |
380 | 384 | | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
381 | 407 | | |
382 | 408 | | |
383 | 409 | | |
| |||
386 | 412 | | |
387 | 413 | | |
388 | 414 | | |
| 415 | + | |
389 | 416 | | |
390 | | - | |
391 | 417 | | |
392 | | - | |
393 | | - | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
394 | 429 | | |
395 | 430 | | |
396 | 431 | | |
| |||
0 commit comments