Skip to content

Commit 449cff0

Browse files
authored
DS storybook - Change a11yTitle to aria-label (#5863)
* Change a11yTitle to aria-label * remove unused imports * add react import to spinner story
1 parent f76da1b commit 449cff0

14 files changed

+38
-46
lines changed

shared/aries-core/src/stories/components/Anchor.stories.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,14 @@ import {
77
textSizesArg,
88
reverseArg,
99
iconArg,
10-
a11yTitleArg,
10+
ariaLabelArg,
1111
} from '../utils/commonArgs';
1212

1313
const meta = {
1414
title: 'Components/Anchor',
1515
component: Anchor,
1616
argTypes: {
17-
a11yTitle: a11yTitleArg,
17+
'aria-label': ariaLabelArg,
1818
disabled: disabledArg,
1919
icon: iconArg,
2020
label: labelArg,
@@ -34,9 +34,9 @@ export const Default: Story = {
3434
return <Anchor {...args} />;
3535
},
3636
args: {
37-
label: 'Link',
37+
'aria-label': 'Navigate to link',
3838
href: '#',
39-
a11yTitle: 'Navigate to link',
39+
label: 'Link',
4040
},
4141
name: 'Anchor',
4242
};

shared/aries-core/src/stories/components/Avatar.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import React from 'react';
12
import type { Meta, StoryObj } from '@storybook/react-webpack5';
23
import { Avatar } from 'grommet';
3-
import { a11yTitleArg, labelArg } from '../utils/commonArgs';
4+
import { ariaLabelArg, labelArg } from '../utils/commonArgs';
45

56
const meta = {
67
title: 'Components/Avatar',
78
component: Avatar,
89
argTypes: {
9-
a11yTitle: a11yTitleArg,
10+
'aria-label': ariaLabelArg,
1011
size: {
1112
control: { type: 'select' },
1213
options: ['xsmall', 'small', 'medium', 'large', 'xlarge'],
@@ -22,7 +23,7 @@ export const Default = {
2223
name: 'Avatar',
2324
render: args => <Avatar {...args} />,
2425
args: {
25-
a11yTitle: 'Image of Jessica',
26+
'aria-label': 'Image of Jessica',
2627
size: 'medium',
2728
src: 'https://1.gravatar.com/avatar/5134a384e69b1f9e2ff2f792145b240d714b79c4a0d49ae02874eb5e96802fd8?size=256&d=initials',
2829
},

shared/aries-core/src/stories/components/Button.stories.tsx

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import type { Meta, StoryObj } from '@storybook/react-webpack5';
33
import { Button } from 'grommet';
44
import {
5-
a11yTitleArg,
5+
ariaLabelArg,
66
disabledArg,
77
fillArg,
88
iconArg,
@@ -13,12 +13,8 @@ import {
1313
const meta = {
1414
title: 'Components/Button',
1515
component: Button,
16-
// TODO: Currently does not work as expected due to theme overrides, when supported, remove comments
17-
// parameters: {
18-
// layout: 'centered',
19-
// },
2016
argTypes: {
21-
a11yTitle: a11yTitleArg,
17+
'aria-label': ariaLabelArg,
2218
active: {
2319
control: { type: 'boolean' },
2420
},
@@ -62,7 +58,7 @@ export const Default = {
6258
name: 'Button',
6359
// Sets default args for argTypes, story specific args
6460
args: {
65-
a11yTitle: undefined,
61+
'aria-label': undefined,
6662
active: false,
6763
busy: false,
6864
disabled: false,

shared/aries-core/src/stories/components/CheckBox.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import type { Meta, StoryObj } from '@storybook/react-webpack5';
33
import { CheckBox } from 'grommet';
44
import {
55
labelArg,
6-
a11yTitleArg,
6+
ariaLabelArg,
77
disabledArg,
88
fillArg,
99
padArg,
@@ -14,7 +14,7 @@ const meta = {
1414
title: 'Components/CheckBox',
1515
component: CheckBox,
1616
argTypes: {
17-
a11yTitle: a11yTitleArg,
17+
'aria-label': ariaLabelArg,
1818
checked: {
1919
control: { type: 'boolean' },
2020
},
@@ -39,7 +39,7 @@ export const Default = {
3939
name: 'CheckBox',
4040
render: args => <CheckBox {...args} />,
4141
args: {
42-
a11yTitle: undefined,
42+
'aria-label': undefined,
4343
checked: false,
4444
disabled: false,
4545
fill: false,

shared/aries-core/src/stories/components/Menu.stories.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from 'react';
22
import type { Meta, StoryObj } from '@storybook/react-webpack5';
33
import { Menu } from 'grommet';
44
import {
5-
a11yTitleArg,
5+
ariaLabelArg,
66
disabledArg,
77
labelArg,
88
tShirtSizes,
@@ -12,7 +12,7 @@ const meta = {
1212
title: 'Components/Menu',
1313
component: Menu,
1414
argTypes: {
15-
a11yTitle: a11yTitleArg,
15+
'aria-label': ariaLabelArg,
1616
disabled: disabledArg,
1717

1818
items: {
@@ -34,7 +34,7 @@ export const Default = {
3434
name: 'Menu',
3535
// Story specific args, sets default args for argTypes
3636
args: {
37-
a11yTitle: undefined,
37+
'aria-label': undefined,
3838
disabled: false,
3939
items: [
4040
{ label: 'Profile', onClick: () => {} },

shared/aries-core/src/stories/components/RangeInput.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1+
import React from 'react';
12
import { useState } from 'react';
23
import type { Meta, StoryObj } from '@storybook/react-webpack5';
34
import { RangeInput } from 'grommet';
4-
import { a11yTitleArg, disabledArg } from '../utils/commonArgs';
5+
import { ariaLabelArg, disabledArg } from '../utils/commonArgs';
56

67
const meta = {
78
title: 'Components/RangeInput',
89
component: RangeInput,
910
argTypes: {
10-
a11yTitle: a11yTitleArg,
11+
'aria-label': ariaLabelArg,
1112
disabled: disabledArg,
1213
max: {
1314
control: { type: 'number' },
@@ -41,7 +42,7 @@ export const Default = {
4142
);
4243
},
4344
args: {
44-
a11yTitle: 'Select range value',
45+
'aria-label': 'Select range value',
4546
disabled: false,
4647
max: 100,
4748
min: 0,

shared/aries-core/src/stories/components/Select.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import React from 'react';
12
import type { Meta, StoryObj } from '@storybook/react-webpack5';
23
import { Select } from 'grommet';
34
import {
4-
a11yTitleArg,
5+
ariaLabelArg,
56
disabledArg,
67
placeholderArg,
78
} from '../utils/commonArgs';
@@ -10,7 +11,7 @@ const meta = {
1011
title: 'Components/Select',
1112
component: Select,
1213
argTypes: {
13-
a11yTitle: a11yTitleArg,
14+
'aria-label': ariaLabelArg,
1415
clear: {
1516
control: { type: 'boolean' },
1617
},
@@ -32,7 +33,7 @@ export const Default = {
3233
name: 'Select',
3334
render: args => <Select {...args} />,
3435
args: {
35-
a11yTitle: 'Select a size',
36+
'aria-label': 'Select a size',
3637
clear: false,
3738
disabled: false,
3839
open: false,

shared/aries-core/src/stories/components/SelectMultiple.stories.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
import React from 'react';
12
import type { Meta, StoryObj } from '@storybook/react-webpack5';
23
import { SelectMultiple } from 'grommet';
34
import {
4-
a11yTitleArg,
5+
ariaLabelArg,
56
disabledArg,
67
placeholderArg,
78
marginArg,
@@ -11,7 +12,7 @@ const meta = {
1112
title: 'Components/SelectMultiple',
1213
component: SelectMultiple,
1314
argTypes: {
14-
a11yTitle: a11yTitleArg,
15+
'aria-label': ariaLabelArg,
1516
disabled: disabledArg,
1617
help: {
1718
control: { type: 'text' },
@@ -60,7 +61,7 @@ export const Default = {
6061
name: 'SelectMultiple',
6162
render: args => <SelectMultiple {...args} />,
6263
args: {
63-
a11yTitle: 'Multiple selection',
64+
'aria-label': 'Multiple selection',
6465
disabled: false,
6566
help: undefined,
6667
limit: undefined,

shared/aries-core/src/stories/components/Skeleton.stories.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
import React from 'react';
12
import type { Meta, StoryObj } from '@storybook/react-webpack5';
23
import { Skeleton } from 'grommet';
34
import {
4-
a11yTitleArg,
55
heightArg,
66
marginArg,
77
padArg,
@@ -13,7 +13,6 @@ const meta = {
1313
title: 'Components/Skeleton',
1414
component: Skeleton,
1515
argTypes: {
16-
a11yTitle: a11yTitleArg,
1716
height: heightArg,
1817
margin: marginArg,
1918
pad: padArg,
@@ -29,7 +28,6 @@ export const Default = {
2928
name: 'Skeleton',
3029
render: args => <Skeleton {...args} />,
3130
args: {
32-
a11yTitle: 'Loading content',
3331
height: 'xxsmall',
3432
margin: 'small',
3533
pad: 'small',

shared/aries-core/src/stories/components/Spinner.stories.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import React from 'react';
12
import type { Meta, StoryObj } from '@storybook/react-webpack5';
23
import { Spinner } from 'grommet';
34

0 commit comments

Comments
 (0)