Skip to content

Commit 59e989e

Browse files
wyunrealvdedios
andauthored
feat(Carousel, CenteredCarousel, Slideshow): design changes and a11y improvements (#1388)
Spec: https://www.figma.com/design/hxJvuIQQ1xf50xIOQFUZbQ/%F0%9F%94%B8-Carousel-Specs?node-id=4498-15575&t=6bLo1yGJsdBrEBkT-0 --------- Co-authored-by: vdedios <victor.dedios@outlook.com> Co-authored-by: Victor Dedios <57688116+vdedios@users.noreply.github.com>
1 parent 5207d01 commit 59e989e

137 files changed

Lines changed: 1219 additions & 386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/__acceptance_tests__/__ssr_pages__/carousel.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const CarouselTest = (): JSX.Element => (
55
<ResponsiveLayout>
66
<Carousel
77
withBullets
8-
items={Array.from({length: 3}, (_, idx) => (
8+
items={Array.from({length: 4}, (_, idx) => (
99
<MediaCard
1010
headline={<Tag type="promo">Headline</Tag>}
1111
title={'Card ' + idx}

src/__private_stories__/carousel-on-different-container-sizes-story.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@ import {
55
ResponsiveLayout,
66
MediaCard,
77
ButtonLink,
8-
Callout,
98
Stack,
10-
IconInformationRegular,
119
Image,
1210
GridLayout,
1311
Placeholder,
@@ -33,16 +31,19 @@ const ExampleCarousel = ({
3331
bullets,
3432
cardsTitlePrefix,
3533
itemsPerPage,
34+
'aria-label': ariaLabelProp,
3635
}: {
3736
numItems: number;
3837
bullets: boolean;
3938
cardsTitlePrefix: number;
4039
itemsPerPage: {mobile: number; tablet: number; desktop: {small: number; medium: number; large: number}};
40+
'aria-label': string;
4141
}) => (
4242
<Carousel
4343
dataAttributes={{testid: 'carousel-story'}}
4444
withBullets={bullets}
4545
itemsPerPage={itemsPerPage}
46+
aria-label={ariaLabelProp}
4647
items={Array.from({length: numItems}, (_, idx) => (
4748
<MediaCard
4849
aria-label={`Carousel ${cardsTitlePrefix} item ${idx}`}
@@ -82,17 +83,14 @@ export const Default: StoryComponent<Args> = ({
8283
<Box paddingY={24}>
8384
<ResponsiveLayout>
8485
<Stack space={16}>
85-
<Callout
86-
description="Arrow controls disappear in touch devices"
87-
asset={<IconInformationRegular />}
88-
/>
8986
<GridLayout
9087
template="8+4"
9188
left={
9289
<ExampleCarousel
9390
numItems={numItems}
9491
bullets={bullets}
9592
itemsPerPage={itemsPerPage}
93+
aria-label="Component story, right placeholder"
9694
cardsTitlePrefix={1}
9795
/>
9896
}
@@ -106,6 +104,7 @@ export const Default: StoryComponent<Args> = ({
106104
numItems={numItems}
107105
bullets={bullets}
108106
itemsPerPage={itemsPerPage}
107+
aria-label="Component story, left placeholder"
109108
cardsTitlePrefix={2}
110109
/>
111110
}
@@ -115,6 +114,7 @@ export const Default: StoryComponent<Args> = ({
115114
bullets={bullets}
116115
itemsPerPage={itemsPerPage}
117116
cardsTitlePrefix={3}
117+
aria-label="Component story, no placeholder"
118118
/>
119119
</Stack>
120120
</ResponsiveLayout>
-7.79 KB
-8.99 KB
-7.65 KB
-8.04 KB

0 commit comments

Comments
 (0)