@pingux/astro 2.208.0-alpha.0 → 2.208.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/AIComponents/PromptInput/PromptInputReadMe.mdx +12 -15
- package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.mdx +13 -19
- package/lib/cjs/components/AccordionGroup/AccordionGroup.mdx +16 -17
- package/lib/cjs/components/ArrayField/ArrayField.mdx +10 -15
- package/lib/cjs/components/Badge/Badge.mdx +6 -8
- package/lib/cjs/components/Breadcrumbs/Breadcrumbs.mdx +11 -17
- package/lib/cjs/components/Button/Button.mdx +8 -12
- package/lib/cjs/components/Calendar/Calendar.mdx +17 -22
- package/lib/cjs/components/Callout/Callout.mdx +8 -13
- package/lib/cjs/components/Card/Card.mdx +6 -8
- package/lib/cjs/components/CheckboxField/CheckboxField.mdx +11 -16
- package/lib/cjs/components/CodeEditor/CodeEditor.mdx +8 -13
- package/lib/cjs/components/CodeView/CodeView.mdx +5 -8
- package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.mdx +10 -13
- package/lib/cjs/components/ColorField/ColorField.mdx +13 -18
- package/lib/cjs/components/ComboBoxField/ComboBoxField.mdx +13 -15
- package/lib/cjs/components/CopyText/CopyText.mdx +6 -8
- package/lib/cjs/components/DataTable/DataTable.mdx +17 -22
- package/lib/cjs/components/DatePicker/DatePicker.mdx +20 -27
- package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +14 -19
- package/lib/cjs/components/ExpandableText/ExpandableText.mdx +9 -15
- package/lib/cjs/components/FileInputField/FileInputField.mdx +11 -16
- package/lib/cjs/components/Footer/Footer.mdx +9 -14
- package/lib/cjs/components/GridList/GridList.mdx +16 -21
- package/lib/cjs/components/HelpHint/HelpHint.mdx +8 -14
- package/lib/cjs/components/Icon/Icon.mdx +5 -3
- package/lib/cjs/components/IconButton/IconButton.mdx +7 -10
- package/lib/cjs/components/IconButtonToggle/IconButtonToggle.mdx +9 -15
- package/lib/cjs/components/Image/Image.mdx +4 -4
- package/lib/cjs/components/ImageUploadField/ImageUploadField.mdx +18 -24
- package/lib/cjs/components/Link/Link.mdx +5 -6
- package/lib/cjs/components/LinkSelectField/LinkSelectField.mdx +18 -24
- package/lib/cjs/components/ListItem/ListItem.mdx +6 -6
- package/lib/cjs/components/ListView/ListView.mdx +22 -23
- package/lib/cjs/components/Loader/Loader.mdx +6 -5
- package/lib/cjs/components/Menu/Menu.mdx +13 -18
- package/lib/cjs/components/Messages/Messages.mdx +9 -13
- package/lib/cjs/components/Modal/Modal.mdx +18 -19
- package/lib/cjs/components/MultivaluesField/MultivaluesField.mdx +14 -20
- package/lib/cjs/components/NavBar/NavBar.mdx +12 -17
- package/lib/cjs/components/NavSideBar/NavSideBar.mdx +12 -17
- package/lib/cjs/components/NavigationHeader/NavigationHeader.mdx +11 -16
- package/lib/cjs/components/NumberField/NumberField.mdx +16 -17
- package/lib/cjs/components/OverlayPanel/OverlayPanel.mdx +10 -14
- package/lib/cjs/components/Pagination/Pagination.mdx +9 -13
- package/lib/cjs/components/PasswordField/PasswordField.mdx +10 -15
- package/lib/cjs/components/PopoverMenu/PopoverMenu.mdx +16 -22
- package/lib/cjs/components/ProgressBar/ProgressBar.mdx +6 -7
- package/lib/cjs/components/RadioGroupField/RadioGroupField.mdx +11 -17
- package/lib/cjs/components/RangeCalendar/RangeCalendar.mdx +17 -22
- package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +11 -16
- package/lib/cjs/components/SearchField/SearchField.mdx +8 -10
- package/lib/cjs/components/SelectField/SelectField.mdx +18 -23
- package/lib/cjs/components/Separator/Separator.mdx +4 -3
- package/lib/cjs/components/ServerErrorBoundary/ServerErrorBoundary.mdx +6 -8
- package/lib/cjs/components/SliderField/SliderField.mdx +12 -15
- package/lib/cjs/components/StatusIcon/StatusIcon.mdx +4 -3
- package/lib/cjs/components/Stepper/Stepper.mdx +18 -20
- package/lib/cjs/components/SwitchField/SwitchField.mdx +9 -14
- package/lib/cjs/components/Tabs/Tabs.mdx +13 -18
- package/lib/cjs/components/TextAreaField/TextAreaField.mdx +8 -12
- package/lib/cjs/components/TextField/TextField.mdx +8 -12
- package/lib/cjs/components/TimeField/TimeField.mdx +12 -18
- package/lib/cjs/components/TooltipTrigger/TooltipTrigger.mdx +4 -3
- package/lib/cjs/types/accessibilityTable.d.ts +8 -0
- package/lib/cjs/types/accessibilityTable.js +6 -0
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +75 -64
- package/lib/cjs/utils/docUtils/AccessibilityTable.d.ts +3 -0
- package/lib/cjs/utils/docUtils/AccessibilityTable.js +38 -0
- package/lib/cjs/utils/docUtils/AccessibilityTable.test.js +192 -0
- package/lib/cjs/utils/docUtils/accessibilityTableConstants.d.ts +130 -0
- package/lib/cjs/utils/docUtils/accessibilityTableConstants.js +137 -0
- package/lib/components/AIComponents/PromptInput/PromptInputReadMe.mdx +12 -15
- package/lib/components/AccordionGridGroup/AccordionGridGroup.mdx +13 -19
- package/lib/components/AccordionGroup/AccordionGroup.mdx +16 -17
- package/lib/components/ArrayField/ArrayField.mdx +10 -15
- package/lib/components/Badge/Badge.mdx +6 -8
- package/lib/components/Breadcrumbs/Breadcrumbs.mdx +11 -17
- package/lib/components/Button/Button.mdx +8 -12
- package/lib/components/Calendar/Calendar.mdx +17 -22
- package/lib/components/Callout/Callout.mdx +8 -13
- package/lib/components/Card/Card.mdx +6 -8
- package/lib/components/CheckboxField/CheckboxField.mdx +11 -16
- package/lib/components/CodeEditor/CodeEditor.mdx +8 -13
- package/lib/components/CodeView/CodeView.mdx +5 -8
- package/lib/components/CollapsiblePanel/CollapsiblePanel.mdx +10 -13
- package/lib/components/ColorField/ColorField.mdx +13 -18
- package/lib/components/ComboBoxField/ComboBoxField.mdx +13 -15
- package/lib/components/CopyText/CopyText.mdx +6 -8
- package/lib/components/DataTable/DataTable.mdx +17 -22
- package/lib/components/DatePicker/DatePicker.mdx +20 -27
- package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +14 -19
- package/lib/components/ExpandableText/ExpandableText.mdx +9 -15
- package/lib/components/FileInputField/FileInputField.mdx +11 -16
- package/lib/components/Footer/Footer.mdx +9 -14
- package/lib/components/GridList/GridList.mdx +16 -21
- package/lib/components/HelpHint/HelpHint.mdx +8 -14
- package/lib/components/Icon/Icon.mdx +5 -3
- package/lib/components/IconButton/IconButton.mdx +7 -10
- package/lib/components/IconButtonToggle/IconButtonToggle.mdx +9 -15
- package/lib/components/Image/Image.mdx +4 -4
- package/lib/components/ImageUploadField/ImageUploadField.mdx +18 -24
- package/lib/components/Link/Link.mdx +5 -6
- package/lib/components/LinkSelectField/LinkSelectField.mdx +18 -24
- package/lib/components/ListItem/ListItem.mdx +6 -6
- package/lib/components/ListView/ListView.mdx +22 -23
- package/lib/components/Loader/Loader.mdx +6 -5
- package/lib/components/Menu/Menu.mdx +13 -18
- package/lib/components/Messages/Messages.mdx +9 -13
- package/lib/components/Modal/Modal.mdx +18 -19
- package/lib/components/MultivaluesField/MultivaluesField.mdx +14 -20
- package/lib/components/NavBar/NavBar.mdx +12 -17
- package/lib/components/NavSideBar/NavSideBar.mdx +12 -17
- package/lib/components/NavigationHeader/NavigationHeader.mdx +11 -16
- package/lib/components/NumberField/NumberField.mdx +16 -17
- package/lib/components/OverlayPanel/OverlayPanel.mdx +10 -14
- package/lib/components/Pagination/Pagination.mdx +9 -13
- package/lib/components/PasswordField/PasswordField.mdx +10 -15
- package/lib/components/PopoverMenu/PopoverMenu.mdx +16 -22
- package/lib/components/ProgressBar/ProgressBar.mdx +6 -7
- package/lib/components/RadioGroupField/RadioGroupField.mdx +11 -17
- package/lib/components/RangeCalendar/RangeCalendar.mdx +17 -22
- package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +11 -16
- package/lib/components/SearchField/SearchField.mdx +8 -10
- package/lib/components/SelectField/SelectField.mdx +18 -23
- package/lib/components/Separator/Separator.mdx +4 -3
- package/lib/components/ServerErrorBoundary/ServerErrorBoundary.mdx +6 -8
- package/lib/components/SliderField/SliderField.mdx +12 -15
- package/lib/components/StatusIcon/StatusIcon.mdx +4 -3
- package/lib/components/Stepper/Stepper.mdx +18 -20
- package/lib/components/SwitchField/SwitchField.mdx +9 -14
- package/lib/components/Tabs/Tabs.mdx +13 -18
- package/lib/components/TextAreaField/TextAreaField.mdx +8 -12
- package/lib/components/TextField/TextField.mdx +8 -12
- package/lib/components/TimeField/TimeField.mdx +12 -18
- package/lib/components/TooltipTrigger/TooltipTrigger.mdx +4 -3
- package/lib/types/accessibilityTable.js +1 -0
- package/lib/types/index.js +1 -0
- package/lib/utils/docUtils/AccessibilityTable.js +30 -0
- package/lib/utils/docUtils/AccessibilityTable.test.js +190 -0
- package/lib/utils/docUtils/accessibilityTableConstants.js +130 -0
- package/package.json +1 -1
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as FileInputFieldStories from './FileInputField.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={FileInputFieldStories} isTemplate />
|
|
5
7
|
|
|
@@ -16,19 +18,12 @@ This component can be used independently and does not require additional compone
|
|
|
16
18
|
|
|
17
19
|
### Accessibility
|
|
18
20
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
#### Screen Readers
|
|
30
|
-
|
|
31
|
-
This component uses the following attributes to assist screen readers:
|
|
32
|
-
- This component uses the **`aria-label`** to provide an accessible name and has **`aria-labelledby`** attribute, supplied with the label ID.
|
|
33
|
-
- Upon uploading the file, the Button component, with the name of the uploaded file, displays with **`aria-describedby`** attribute, which references the helpText if passed along.
|
|
34
|
-
- The delete button has an **`aria-label`** to provide an accessible name.
|
|
21
|
+
<AccessibilityTable keyboardRows={[
|
|
22
|
+
KeyboardRows.tabFocusesField,
|
|
23
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
24
|
+
KeyboardRows.spaceEnterSelectsComponent,
|
|
25
|
+
]} screenReaderRows={[
|
|
26
|
+
'This component uses the **`aria-label`** to provide an accessible name and has **`aria-labelledby`** attribute, supplied with the label ID.',
|
|
27
|
+
'Upon uploading the file, the Button component, with the name of the uploaded file, displays with **`aria-describedby`** attribute, which references the helpText if passed along.',
|
|
28
|
+
'The delete button has an **`aria-label`** to provide an accessible name.',
|
|
29
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as FooterStories from './Footer.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={FooterStories} isTemplate />
|
|
5
7
|
|
|
@@ -15,17 +17,10 @@ This component requires these components:
|
|
|
15
17
|
- FooterNav
|
|
16
18
|
- FooterNavItem
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
| Shift + Tab | Moves focus to the previous focusable component. |
|
|
26
|
-
|
|
27
|
-
#### Screen readers
|
|
28
|
-
|
|
29
|
-
This component uses the following attributes to assist screen readers:
|
|
30
|
-
- Each Link component uses the **`aria-label`** attribute to provide an accessible name.
|
|
31
|
-
- The Icon uses the **`aria-hidden`** attribute to hide its content from assistive technology.
|
|
20
|
+
<AccessibilityTable keyboardRows={[
|
|
21
|
+
{ key: 'Tab', description: 'All of the content in the Footer is focusable.' },
|
|
22
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
23
|
+
]} screenReaderRows={[
|
|
24
|
+
ScreenReaderRows.eachLinkAriaLabel,
|
|
25
|
+
ScreenReaderRows.iconAriaHidden,
|
|
26
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as GridListStories from './GridList.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={GridListStories} isTemplate />
|
|
5
7
|
|
|
@@ -23,27 +25,20 @@ This component requires [Item].
|
|
|
23
25
|
|
|
24
26
|
This component adheres to the [WAI-ARIA Grid](https://www.w3.org/WAI/ARIA/apg/patterns/grid/) accessibility guidelines.
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
This component uses the following attributes to assist screen readers:
|
|
41
|
-
- The **`role="grid"`** attribute is used to indicate the grid structure.
|
|
42
|
-
- The **`aria-label`** attribute provides an accessible name for the grid.
|
|
43
|
-
- The **`role="row"`** attribute is used to indicate the row structure.
|
|
44
|
-
- The **`role="gridcell"`** attribute is used to indicate the cell structure.
|
|
45
|
-
- The **`aria-selected`** attribute indicates whether an item is selected.
|
|
46
|
-
- The **`draggable`** attribute indicates whether an item is draggable.
|
|
28
|
+
<AccessibilityTable keyboardRows={[
|
|
29
|
+
{ key: 'Tab', description: 'Moves focus to the next focusable element, within the row. (keyboardNavigationBehavior="tab")' },
|
|
30
|
+
{ key: 'Shift + Tab', description: 'Moves focus to the previous focusable element, within the row. (keyboardNavigationBehavior="tab")' },
|
|
31
|
+
{ key: 'Arrow Keys', description: 'Navigates between items in the grid. (Up/Down in all modes, Left/Right in keyboardNavigationBehavior="arrow")' },
|
|
32
|
+
KeyboardRows.homeFirstRow,
|
|
33
|
+
KeyboardRows.endLastVisibleRow,
|
|
34
|
+
]} screenReaderRows={[
|
|
35
|
+
'The **`role="grid"`** attribute is used to indicate the grid structure.',
|
|
36
|
+
'The **`aria-label`** attribute provides an accessible name for the grid.',
|
|
37
|
+
'The **`role="row"`** attribute is used to indicate the row structure.',
|
|
38
|
+
'The **`role="gridcell"`** attribute is used to indicate the cell structure.',
|
|
39
|
+
'The **`aria-selected`** attribute indicates whether an item is selected.',
|
|
40
|
+
'The **`draggable`** attribute indicates whether an item is draggable.',
|
|
41
|
+
]} />
|
|
47
42
|
|
|
48
43
|
---
|
|
49
44
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as HelpHintStories from './HelpHint.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={HelpHintStories} isTemplate />
|
|
5
6
|
|
|
@@ -16,18 +17,11 @@ This component can be used independently and does not require additional compone
|
|
|
16
17
|
### Accessibility
|
|
17
18
|
This component adheres to [WAI-ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html) accessibility guidelines.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
| Tab | Focuses the help hint and follows the page tab sequence. |
|
|
27
|
-
|
|
28
|
-
#### Screen Readers
|
|
29
|
-
|
|
30
|
-
This component uses the following attributes to assist screen readers:
|
|
31
|
-
- The trigger button uses **`aria-expanded`** to indicate the expansion and collapse of the popover.
|
|
32
|
-
- The **`aria-live`** attribute announces the dynamic changes in live region content.
|
|
20
|
+
<AccessibilityTable keyboardRows={[
|
|
21
|
+
{ key: 'Space or Enter', description: 'Selects the help hint.' },
|
|
22
|
+
{ key: 'Tab', description: 'Focuses the help hint and follows the page tab sequence.' },
|
|
23
|
+
]} screenReaderRows={[
|
|
24
|
+
'The trigger button uses **`aria-expanded`** to indicate the expansion and collapse of the popover.',
|
|
25
|
+
'The **`aria-live`** attribute announces the dynamic changes in live region content.',
|
|
26
|
+
]} />
|
|
33
27
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as IconStories from './Icon.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={IconStories} isTemplate />
|
|
5
6
|
|
|
@@ -33,6 +34,7 @@ This component can be used independently and does not require additional compone
|
|
|
33
34
|
|
|
34
35
|
### Accessibility
|
|
35
36
|
|
|
37
|
+
{/* Non-standard section: '#### Labelling' documents SVG title prop usage, not covered by AccessibilityTable API. Flagged for future migration. */}
|
|
36
38
|
#### Labelling
|
|
37
39
|
|
|
38
40
|
The Icon component accepts the title prop:
|
|
@@ -41,9 +43,9 @@ The `name` will be passed inside `<title>` element of the SVG.
|
|
|
41
43
|
The `id` is optional. If not specified, it will be generated automatically.
|
|
42
44
|
This is needed to make SVG icon accessible.
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
<AccessibilityTable screenReaderRows={[
|
|
47
|
+
'If the icon has a title associated with it, the **`aria-labelledby`** attribute is used to provide the label ID.',
|
|
48
|
+
]} />
|
|
47
49
|
|
|
48
50
|
|
|
49
51
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as IconButtonStories from './IconButton.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={IconButtonStories} isTemplate />
|
|
5
6
|
|
|
@@ -22,13 +23,9 @@ This component requires the [Icon](./?path=/story/components-icon--default) comp
|
|
|
22
23
|
### Accessibility
|
|
23
24
|
This component adheres to [WAI-ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html) accessibility guidelines.
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
#### Screen Readers
|
|
33
|
-
|
|
34
|
-
This component uses the **`aria-label`** to provide an accessible name.
|
|
26
|
+
<AccessibilityTable keyboardRows={[
|
|
27
|
+
{ key: 'Space or Enter', description: 'Selects the icon button.' },
|
|
28
|
+
{ key: 'Tab', description: 'Focuses the icon button and follows the page tab sequence.' },
|
|
29
|
+
]} screenReaderRows={[
|
|
30
|
+
'This component uses the **`aria-label`** to provide an accessible name.',
|
|
31
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as IconButtonToggleStories from './IconButtonToggle.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={IconButtonToggleStories} isTemplate />
|
|
5
7
|
|
|
@@ -15,18 +17,10 @@ This component can be used independently and does not require additional compone
|
|
|
15
17
|
### Accessibility
|
|
16
18
|
This component adheres to [WAI-ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html) accessibility guidelines.
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
#### Screen Readers
|
|
26
|
-
|
|
27
|
-
This component uses the following attributes to assist screen readers:
|
|
28
|
-
- This component uses the **`aria-label`** to provide an accessible name, which toggles based on the toggle state.
|
|
29
|
-
- The **`aria-labelledby`** attribute is used to provide the label ID.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
<AccessibilityTable keyboardRows={[
|
|
21
|
+
KeyboardRows.spaceEnterSelectsComponentSimple,
|
|
22
|
+
KeyboardRows.tabFocusesComponent,
|
|
23
|
+
]} screenReaderRows={[
|
|
24
|
+
'This component uses the **`aria-label`** to provide an accessible name, which toggles based on the toggle state.',
|
|
25
|
+
'The **`aria-labelledby`** attribute is used to provide the label ID.',
|
|
26
|
+
]} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as ImageStories from './Image.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={ImageStories} isTemplate />
|
|
5
6
|
|
|
@@ -21,9 +22,8 @@ This component can be used independently and does not require additional compone
|
|
|
21
22
|
|
|
22
23
|
### Accessibility
|
|
23
24
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
- The **`alt`** attribute specifies an alternate text for the image.
|
|
25
|
+
<AccessibilityTable screenReaderRows={[
|
|
26
|
+
'The **`alt`** attribute specifies an alternate text for the image.',
|
|
27
|
+
]} />
|
|
28
28
|
|
|
29
29
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as ImageUploadFieldStories from './ImageUploadField.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={ImageUploadFieldStories} isTemplate />
|
|
5
7
|
|
|
@@ -13,27 +15,19 @@ This component requires the OverlayProvider component.
|
|
|
13
15
|
|
|
14
16
|
### Accessibility
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
This component uses the following attributes to assist screen readers:
|
|
34
|
-
|
|
35
|
-
- The input uses the **`aria-labelledby`** attribute to reference the label.
|
|
36
|
-
- The trigger button uses the **`aria-label`** attribute to provide an accessible name.
|
|
37
|
-
- The **`aria-expanded`** attribute is used to indicate the expansion or collapse of the popover.
|
|
38
|
-
- The **`aria-haspopup`** attribute indicates the type of popup content as a menu. Once expanded, **`aria-controls`** is added to the button pointing to the popover.
|
|
39
|
-
- The menu uses vertical **`aria-orientation`** by default, and each menu item has a “False” **`aria-disabled`** value.
|
|
18
|
+
<AccessibilityTable keyboardRows={[
|
|
19
|
+
KeyboardRows.tabFocusesField,
|
|
20
|
+
{ key: 'Space or Enter', description: 'When the trigger is focused, the file browser opens. When the menu item is focused, it triggers an action.' },
|
|
21
|
+
{ key: 'Down arrow', description: 'After uploading, pressing the Down arrow with a focused trigger opens the popover menu.' },
|
|
22
|
+
{ key: 'Arrow keys', description: 'Can be used to move the selection in the popover.' },
|
|
23
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
24
|
+
KeyboardRows.homeFirstListboxItem,
|
|
25
|
+
KeyboardRows.endLastListboxItem,
|
|
26
|
+
{ key: 'Esc', description: 'Pressing the escape key closes the popover menu and adds focus to the trigger.' },
|
|
27
|
+
]} screenReaderRows={[
|
|
28
|
+
'The input uses the **`aria-labelledby`** attribute to reference the label.',
|
|
29
|
+
'The trigger button uses the **`aria-label`** attribute to provide an accessible name.',
|
|
30
|
+
'The **`aria-expanded`** attribute is used to indicate the expansion or collapse of the popover.',
|
|
31
|
+
'The **`aria-haspopup`** attribute indicates the type of popup content as a menu. Once expanded, **`aria-controls`** is added to the button pointing to the popover.',
|
|
32
|
+
'The menu uses vertical **`aria-orientation`** by default, and each menu item has a “False” **`aria-disabled`** value.',
|
|
33
|
+
]} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as LinkStories from './Link.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={LinkStories} isTemplate />
|
|
5
6
|
|
|
@@ -20,9 +21,7 @@ This component can be used independently and does not require additional compone
|
|
|
20
21
|
### Accessibility
|
|
21
22
|
This component adheres to [WAI-ARIA Link](https://www.w3.org/WAI/ARIA/apg/patterns/link/) accessibility guidelines.
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
| Space or Enter | Selects the link. |
|
|
28
|
-
| Tab | Focuses the link and follows the page tab sequence. |
|
|
24
|
+
<AccessibilityTable keyboardRows={[
|
|
25
|
+
{ key: 'Space or Enter', description: 'Selects the link.' },
|
|
26
|
+
{ key: 'Tab', description: 'Focuses the link and follows the page tab sequence.' },
|
|
27
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as LinkSelectFieldStories from './LinkSelectField.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={LinkSelectFieldStories} isTemplate />
|
|
5
7
|
|
|
@@ -22,27 +24,19 @@ This component requires the OverlayProvider and Item originating from [react-sta
|
|
|
22
24
|
|
|
23
25
|
### Accessibility
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
This component uses the following attributes to assist screen readers:
|
|
42
|
-
|
|
43
|
-
- The trigger button uses the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover menu, the **`aria-label`** attribute to provide an accessible name, and the **`aria-labelledby`** attribute to reference the label.
|
|
44
|
-
- The **`aria-haspopup`** attribute indicates the type of popup content as a listbox.
|
|
45
|
-
- A visually hidden DismissButton is added for screen reader users to close the overlay in the absence of a dismiss button.
|
|
46
|
-
- The listbox in the popover uses the **`aria-labelledby`** attribute, which also references the label.
|
|
47
|
-
- Each option uses the **`aria-selected`** attribute to indicate the selection state, **`aria-posinset`** to give the option’s position in the current set of list items, and **`aria-setsize`** to define the current set of options.
|
|
48
|
-
- The **`aria-disabled`** attribute value is “False” for each option, by default.
|
|
27
|
+
<AccessibilityTable keyboardRows={[
|
|
28
|
+
KeyboardRows.tabFocusesField,
|
|
29
|
+
{ key: 'Space or Enter', description: 'When the trigger is focused, the menu opens or closes. When the menu item is focused, it selects the listbox option.' },
|
|
30
|
+
{ key: 'Arrow keys', description: 'Can be used to move the selection in the listbox.' },
|
|
31
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
32
|
+
KeyboardRows.homeFirstListboxItem,
|
|
33
|
+
KeyboardRows.endLastListboxItem,
|
|
34
|
+
{ key: 'Esc', description: 'Pressing the escape key closes the popover menu and adds focus to the previously focused component.' },
|
|
35
|
+
]} screenReaderRows={[
|
|
36
|
+
'The trigger button uses the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover menu, the **`aria-label`** attribute to provide an accessible name, and the **`aria-labelledby`** attribute to reference the label.',
|
|
37
|
+
'The **`aria-haspopup`** attribute indicates the type of popup content as a listbox.',
|
|
38
|
+
'A visually hidden DismissButton is added for screen reader users to close the overlay in the absence of a dismiss button.',
|
|
39
|
+
'The listbox in the popover uses the **`aria-labelledby`** attribute, which also references the label.',
|
|
40
|
+
"Each option uses the **`aria-selected`** attribute to indicate the selection state, **`aria-posinset`** to give the option’s position in the current set of list items, and **`aria-setsize`** to define the current set of options. ",
|
|
41
|
+
'The **`aria-disabled`** attribute value is “False” for each option, by default.',
|
|
42
|
+
]} />
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
2
4
|
|
|
3
5
|
<Meta title="Components/ListItem/ListItem" />
|
|
4
6
|
|
|
@@ -13,9 +15,7 @@ This component can be used independently and does not require additional compone
|
|
|
13
15
|
|
|
14
16
|
### Accessibility
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| Space or Enter | Selects the item. |
|
|
21
|
-
| Tab | Focuses item and follows the page tab sequence. |
|
|
18
|
+
<AccessibilityTable keyboardRows={[
|
|
19
|
+
KeyboardRows.spaceEnterSelectsItem,
|
|
20
|
+
KeyboardRows.tabFocusesItem,
|
|
21
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as ListViewStories from './ListView.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={ListViewStories} isTemplate />
|
|
5
7
|
|
|
@@ -22,35 +24,32 @@ This component requires [ListViewItem](./?path=/docs/components-listviewitem--do
|
|
|
22
24
|
|
|
23
25
|
This component should adhere to the [WAI-ARIA ListBox](https://www.w3.org/WAI/ARIA/apg/patterns/listbox/) accessibility guidelines.
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
- Each ListViewItem uses the **`aria-rowindex`** attribute, which defines a component's position in the total number of rows.
|
|
45
|
-
- Each item also uses the aria-label, **`aria-colindex`** attributes to indicate the component’s column position and aria-selected to indicate the currently selected state.
|
|
46
|
-
|
|
27
|
+
<AccessibilityTable
|
|
28
|
+
keyboardRows={[
|
|
29
|
+
KeyboardRows.spaceEnterSelectsItem,
|
|
30
|
+
KeyboardRows.tabFocusesItem,
|
|
31
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
32
|
+
{ key: 'Arrow keys', description: 'Can be used to move the selection in the menu.' },
|
|
33
|
+
KeyboardRows.homeFirstRow,
|
|
34
|
+
KeyboardRows.endLastVisibleRow,
|
|
35
|
+
]}
|
|
36
|
+
screenReaderRows={[
|
|
37
|
+
ScreenReaderRows.ariaLabelAccessibleName,
|
|
38
|
+
'The **`aria-rowcount`** and **`aria-columncount`** attributes are used to indicate the total number of rows and columns in the grid structure.',
|
|
39
|
+
'The **`aria-multiselectable`** attribute is used to indicate that users can toggle between items in the grid.',
|
|
40
|
+
"Each ListViewItem uses the **`aria-rowindex`** attribute, which defines a component's position in the total number of rows.",
|
|
41
|
+
"Each item also uses the aria-label, **`aria-colindex`** attributes to indicate the component's column position and aria-selected to indicate the currently selected state.",
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
{/* Non-standard sections: ‘#### NOTES:’ and ‘#### KNOWN ISSUES:’ contain runtime developer guidance, not accessibility patterns. Flagged for future migration. */}
|
|
47
46
|
#### NOTES:
|
|
48
47
|
- See the [ListAndPanel](./?path=/docs/recipes-listandpanel--docs) and [ScrollableListView](./?path=/docs/recipes-scrollablelistview--docs) recipes for more detailed examples.
|
|
49
48
|
|
|
50
49
|
#### KNOWN ISSUES:
|
|
51
50
|
Error Message: **`ResizeObserver loop completed with undelivered notifications.`**
|
|
52
51
|
|
|
53
|
-
The ListView
|
|
52
|
+
The ListView’s ResizeObserver exhibits a rendering bug specifically in development mode. This issue originates from @react-aria/virtualizer and is expected to be resolved upon upgrading to React 18.
|
|
54
53
|
|
|
55
54
|
Refer to issue [!1924](https://github.com/adobe/react-spectrum/issues/1924) for further details.
|
|
56
55
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as LoaderStories from './Loader.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={LoaderStories} isTemplate />
|
|
5
7
|
|
|
@@ -23,11 +25,10 @@ This component can be used independently and does not require additional compone
|
|
|
23
25
|
|
|
24
26
|
### Accessibility
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- The **`aria-live`** attribute is used to announce content changes in a live region.
|
|
28
|
+
<AccessibilityTable screenReaderRows={[
|
|
29
|
+
ScreenReaderRows.ariaLabelAccessibleName,
|
|
30
|
+
ScreenReaderRows.ariaLiveAnnounce,
|
|
31
|
+
]} />
|
|
31
32
|
|
|
32
33
|
### Determinate vs Indeterminate usage
|
|
33
34
|
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
2
4
|
|
|
3
5
|
<Meta title="Components/Menu/Menu" />
|
|
4
6
|
|
|
@@ -23,21 +25,14 @@ This component requires the Item component, which is exported within Astro, but
|
|
|
23
25
|
|
|
24
26
|
This component should adhere to the [WAI-ARIA Menu](https://www.w3.org/WAI/tutorials/menus/) accessibility guidelines.
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
#### Screen Readers
|
|
39
|
-
|
|
40
|
-
This component uses the following attributes to assist screen readers:
|
|
41
|
-
- The **`aria-label`** attribute is used to provide an accessible name.
|
|
42
|
-
- Each menu option has the default **`aria-disabled`** value as “False.”
|
|
43
|
-
- The **`aria-orientation`** attribute indicates whether the menu is horizontally or vertically oriented, or undefined.
|
|
28
|
+
<AccessibilityTable keyboardRows={[
|
|
29
|
+
{ key: 'Space or Enter', description: 'Selects the menu item.' },
|
|
30
|
+
{ key: 'Tab', description: 'Focuses the menu item and follows the page tab sequence.' },
|
|
31
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
32
|
+
KeyboardRows.homeFirstRow,
|
|
33
|
+
KeyboardRows.endLastVisibleRow,
|
|
34
|
+
]} screenReaderRows={[
|
|
35
|
+
ScreenReaderRows.ariaLabelAccessibleName,
|
|
36
|
+
'Each menu option has the default **`aria-disabled`** value as “False.” ',
|
|
37
|
+
'The **`aria-orientation`** attribute indicates whether the menu is horizontally or vertically oriented, or undefined.',
|
|
38
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as MessagesStories from './Messages.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={MessagesStories} isTemplate />
|
|
5
7
|
|
|
@@ -21,16 +23,10 @@ This component requires the Item component, which is exported within Astro, but
|
|
|
21
23
|
|
|
22
24
|
### Accessibility
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
| Space or Enter | Selects the button when it is focused. |
|
|
32
|
-
| Shift + Tab | Moves focus to the previous focusable component. |
|
|
33
|
-
|
|
34
|
-
#### Screen Readers
|
|
35
|
-
|
|
36
|
-
The **`aria-live`** attribute is used to announce content changes in a live region.
|
|
26
|
+
<AccessibilityTable keyboardRows={[
|
|
27
|
+
{ key: 'Tab', description: 'Focuses the IconButton within the message and follows the page tab sequence.' },
|
|
28
|
+
{ key: 'Space or Enter', description: 'Selects the button when it is focused.' },
|
|
29
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
30
|
+
]} screenReaderRows={[
|
|
31
|
+
ScreenReaderRows.ariaLiveAnnounce,
|
|
32
|
+
]} />
|