Skip to content

Commit 96ab617

Browse files
author
katiegoines
committed
Merge branch 'main' into a11y-mobile-toc
2 parents ad67a12 + 5ac6f98 commit 96ab617

File tree

50 files changed

+1249
-359
lines changed

Some content is hidden

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

50 files changed

+1249
-359
lines changed

Readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ let mut a = String::from("a");
175175
Videos can be added using the `<Video />` component and referencing a path to the video file. The video should be an `.mp4` file and should exist in the `/public` directory
176176

177177
```jsx
178-
<Video src="/path/to/video.mp4" />
178+
<Video src="/path/to/video.mp4" description="Video - [video description]" />
179179
```
180180

181181
## Accessibility testing

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
"loader-utils": "2.0.4",
9090
"minimatch": "3.1.2",
9191
"decode-uri-component": "0.2.1",
92-
"fast-xml-parser": "4.2.5",
92+
"**/fast-xml-parser": "4.4.1",
9393
"semver": "7.5.2",
9494
"tough-cookie": "4.1.3",
9595
"aws-cdk-lib": "2.80.0",
3.75 KB
Loading
643 KB
Binary file not shown.
994 KB
Binary file not shown.
1.5 MB
Binary file not shown.

src/components/Modal/Modal.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ export const Modal = ({ isGen1 }: ModalProps) => {
113113
variation="primary"
114114
className="modal-action modal-action--primary"
115115
>
116-
Learn more <IconChevron className="icon-rotate-270" />
116+
Learn more about Gen 2
117+
<IconChevron className="icon-rotate-270" />
117118
</InternalLinkButton>
118119
</Flex>
119120
</Flex>

src/components/Video/Video.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { useState, useEffect, useRef } from 'react';
22
import { View } from '@aws-amplify/ui-react';
33

44
interface VideoProps {
5+
description: string;
56
autoPlay?: boolean;
67
muted?: boolean;
78
loop?: true;
@@ -14,17 +15,21 @@ export const reducedMotionMediaQuery =
1415

1516
/**
1617
* @description The Video component defaults to a muted, auto play video.
17-
* Currently, we also assume the surrounding content will adequately describe
18-
* the video so we default to aria-hidden="true".
1918
*/
2019
export const Video = ({
20+
description,
2121
autoPlay = true,
2222
muted = true,
2323
loop = true,
2424
src,
2525
testId,
2626
...rest
2727
}: VideoProps) => {
28+
if (!description) {
29+
throw new Error(
30+
`<Video src="${src}"> is missing required description prop`
31+
);
32+
}
2833
/**
2934
* Assume user prefers reduced motion until we can check
3035
* in the useEffect for the media query match, otherwise Next SSG
@@ -70,7 +75,7 @@ export const Video = ({
7075
width="100%"
7176
playsInline={true}
7277
controls={true}
73-
aria-hidden="true"
78+
aria-label={description}
7479
testId={testId}
7580
{...rest}
7681
>

src/components/Video/__tests__/Video.test.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,13 @@ const playSpy = jest
3030

3131
describe('Video', () => {
3232
const testId = 'videoTest';
33-
const component = <Video src="test-video.mp4" testId={testId}></Video>;
33+
const component = (
34+
<Video
35+
src="test-video.mp4"
36+
description="Video - Test"
37+
testId={testId}
38+
></Video>
39+
);
3440

3541
beforeEach(() => {
3642
mockMatchMedia('');

src/directory/directory.mjs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const directory = {
3939
path: 'src/pages/[platform]/start/manual-installation/index.mdx'
4040
},
4141
{
42-
path: 'src/pages/[platform]/start/connect-existing-aws-resources/index.mdx'
42+
path: 'src/pages/[platform]/start/connect-to-aws-resources/index.mdx'
4343
},
4444
{
4545
path: 'src/pages/[platform]/start/kotlin-coroutines/index.mdx'
@@ -136,6 +136,9 @@ export const directory = {
136136
},
137137
{
138138
path: 'src/pages/[platform]/build-a-backend/auth/manage-users/manage-devices/index.mdx'
139+
},
140+
{
141+
path: 'src/pages/[platform]/build-a-backend/auth/manage-users/with-amplify-console/index.mdx'
139142
}
140143
]
141144
},
@@ -311,6 +314,9 @@ export const directory = {
311314
},
312315
{
313316
path: 'src/pages/[platform]/build-a-backend/data/override-resources/index.mdx'
317+
},
318+
{
319+
path: 'src/pages/[platform]/build-a-backend/data/manage-with-amplify-console/index.mdx'
314320
}
315321
]
316322
},
@@ -352,6 +358,9 @@ export const directory = {
352358
},
353359
{
354360
path: 'src/pages/[platform]/build-a-backend/storage/data-usage/index.mdx'
361+
},
362+
{
363+
path: 'src/pages/[platform]/build-a-backend/storage/manage-with-amplify-console/index.mdx'
355364
}
356365
]
357366
},
@@ -367,6 +376,9 @@ export const directory = {
367376
{
368377
path: 'src/pages/[platform]/build-a-backend/functions/configure-functions/index.mdx'
369378
},
379+
{
380+
path: 'src/pages/[platform]/build-a-backend/functions/scheduling-functions/index.mdx'
381+
},
370382
{
371383
path: 'src/pages/[platform]/build-a-backend/functions/streaming-logs/index.mdx'
372384
},

0 commit comments

Comments
 (0)