@pingux/astro 2.207.1-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/Badge/Badge.styles.d.ts +152 -0
- package/lib/cjs/components/Badge/Badge.styles.js +9 -1
- 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.js +4 -2
- package/lib/cjs/components/Pagination/Pagination.mdx +9 -13
- package/lib/cjs/components/Pagination/Pagination.styles.js +1 -1
- 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/TableBase/TableBase.js +4 -1
- package/lib/cjs/components/TableBase/TableBase.stories.js +8 -8
- 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/styles/themeOverrides/nextGenDarkMode/variants/badges.d.ts +42 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.js +38 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/cards.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/cards.js +4 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +26 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +27 -5
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +220 -18
- package/lib/cjs/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +202 -0
- package/lib/cjs/styles/themes/next-gen/variants/badges.js +42 -1
- package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/cards.js +3 -1
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +11 -17
- package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +13 -17
- package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +6 -0
- package/lib/cjs/styles/themes/next-gen/variants/text.js +6 -0
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +11 -17
- 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/Badge/Badge.styles.js +9 -1
- 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.js +4 -2
- package/lib/components/Pagination/Pagination.mdx +9 -13
- package/lib/components/Pagination/Pagination.styles.js +1 -1
- 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/TableBase/TableBase.js +4 -1
- package/lib/components/TableBase/TableBase.stories.js +8 -8
- 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/styles/themeOverrides/nextGenDarkMode/variants/badges.js +38 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/cards.js +4 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +27 -5
- package/lib/styles/themes/next-gen/next-gen.js +1 -1
- package/lib/styles/themes/next-gen/variants/badges.js +42 -1
- package/lib/styles/themes/next-gen/variants/cards.js +3 -1
- package/lib/styles/themes/next-gen/variants/tableBase.js +13 -17
- package/lib/styles/themes/next-gen/variants/text.js +6 -0
- 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,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as PromptInputStories from './PromptInput.stories';
|
|
3
|
+
import AccessibilityTable from '../../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={PromptInputStories} isTemplate />
|
|
5
6
|
|
|
@@ -38,21 +39,17 @@ The `PromptInput` component is used to capture user input in a conversational UI
|
|
|
38
39
|
|
|
39
40
|
This component adheres to accessibility guidelines to ensure a better user experience for all users.
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
- **`aria-label`**: Describes the purpose of the input field.
|
|
54
|
-
- **`aria-disabled`**: Indicates when the input is disabled.
|
|
55
|
-
- **`aria-live`**: Announces changes to the input dynamically.
|
|
42
|
+
<AccessibilityTable keyboardRows={[
|
|
43
|
+
{ key: 'Tab', description: 'Focuses on the next focusable element within the input.' },
|
|
44
|
+
{ key: 'Shift + Tab', description: 'Moves focus to the previous focusable element.' },
|
|
45
|
+
{ key: 'Enter', description: 'Submits the input when `onSubmit` is defined.' },
|
|
46
|
+
{ key: 'Shift + Enter', description: 'Adds a new line to the input.' },
|
|
47
|
+
{ key: 'Escape', description: 'Cancels the input when `onCancel` is defined.' },
|
|
48
|
+
]} screenReaderRows={[
|
|
49
|
+
'**`aria-label`**: Describes the purpose of the input field.',
|
|
50
|
+
'**`aria-disabled`**: Indicates when the input is disabled.',
|
|
51
|
+
'**`aria-live`**: Announces changes to the input dynamically.',
|
|
52
|
+
]} />
|
|
56
53
|
|
|
57
54
|
### Example Usage
|
|
58
55
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as AccordionGridGroupStories from './AccordionGridGroup.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={AccordionGridGroupStories} isTemplate />
|
|
5
7
|
|
|
@@ -20,22 +22,14 @@ This component requires the Header, Body and Item originating from [react-statel
|
|
|
20
22
|
|
|
21
23
|
This component should adhere to the [WAI-ARIA Accordion](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion) accessibility guidelines.
|
|
22
24
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
#### Screen readers
|
|
35
|
-
|
|
36
|
-
This component uses the following attributes to assist screen readers:
|
|
37
|
-
|
|
38
|
-
- The accordion grid item header button uses the **`aria-selected`** attribute to indicate the selection state of the row.
|
|
39
|
-
- The accordion header button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
|
40
|
-
- The **`aria-multiselectable`** attribute indicates that the user can toggle numerous items from the grid.
|
|
41
|
-
- The grid uses the **`aria-label`** attribute to provide an accessible name.
|
|
25
|
+
<AccessibilityTable keyboardRows={[
|
|
26
|
+
{ key: 'Space or Enter', description: 'When focus is on the header panel of a collapsed section, these keys toggle the component.' },
|
|
27
|
+
KeyboardRows.tabAccordionFocusable,
|
|
28
|
+
KeyboardRows.shiftTabAccordionFocusPrevious,
|
|
29
|
+
{ key: 'Arrow Keys', description: 'All components are accessible using arrow keys.' },
|
|
30
|
+
]} screenReaderRows={[
|
|
31
|
+
'The accordion grid item header button uses the **`aria-selected`** attribute to indicate the selection state of the row.',
|
|
32
|
+
ScreenReaderRows.accordionAriaExpanded,
|
|
33
|
+
'The **`aria-multiselectable`** attribute indicates that the user can toggle numerous items from the grid.',
|
|
34
|
+
'The grid uses the **`aria-label`** attribute to provide an accessible name.',
|
|
35
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as AccordionGroupStories from './AccordionGroup.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={AccordionGroupStories} isTemplate />
|
|
5
7
|
|
|
@@ -27,24 +29,21 @@ This component requires Item originating from [react-stately/collections](https:
|
|
|
27
29
|
|
|
28
30
|
This component should adhere to the [WAI-ARIA Accordion](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/examples/accordion) accessibility guidelines.
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
<AccessibilityTable
|
|
33
|
+
keyboardRows={[
|
|
34
|
+
{ key: 'Space or Enter', description: 'When focus is on the accordion header of a collapsed section, these keys expand the section.' },
|
|
35
|
+
KeyboardRows.tabAccordionFocusable,
|
|
36
|
+
KeyboardRows.shiftTabAccordionFocusPrevious,
|
|
37
|
+
]}
|
|
38
|
+
screenReaderRows={[
|
|
39
|
+
ScreenReaderRows.accordionAriaExpanded,
|
|
40
|
+
'When expanded, the **`aria-controls`** attribute is added to the button pointing to the content. The button uses **`aria-label`** to provide an accessible name.',
|
|
41
|
+
'The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.',
|
|
42
|
+
]}
|
|
43
|
+
/>
|
|
44
|
+
|
|
45
|
+
{/* Non-standard section: '#### Slots' documents prop usage, not an accessibility pattern. Flagged for future migration. */}
|
|
40
46
|
#### Slots
|
|
41
47
|
|
|
42
48
|
The slots prop has been provided for added flexibility. Use the **`postHeading`** slot to add helpHint or icon elements next to the heading
|
|
43
49
|
section. Keep in mind that this component is best suited for specific designs necessitates its use.
|
|
44
|
-
|
|
45
|
-
#### Screen readers
|
|
46
|
-
|
|
47
|
-
This component uses the following attributes to assist screen readers:
|
|
48
|
-
- The accordion header button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
|
|
49
|
-
- When expanded, the **`aria-controls`** attribute is added to the button pointing to the content. The button uses **`aria-label`** to provide an accessible name.
|
|
50
|
-
- The **`aria-labelledby`** attribute is added to the entire accordion component, which is supplied with the button ID.
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as ArrayFieldStories from './ArrayField.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={ArrayFieldStories} isTemplate />
|
|
5
7
|
|
|
@@ -18,18 +20,11 @@ This component requires the appropriate field component ([TextField](./?path=/st
|
|
|
18
20
|
|
|
19
21
|
### Accessibility
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
| Shift + Tab | Moves focus to the previous focusable component. |
|
|
30
|
-
|
|
31
|
-
#### Screen Readers
|
|
32
|
-
|
|
33
|
-
This component uses the following attributes to assist screen readers:
|
|
34
|
-
- The input uses the **`aria-invalid`** attribute to alert users that the values entered are not in the expected format.
|
|
35
|
-
- The field and buttons use the **`aria-label`** attribute to provide accessible names.
|
|
23
|
+
<AccessibilityTable keyboardRows={[
|
|
24
|
+
{ key: 'Space or Enter', description: 'When focused, selects the item.' },
|
|
25
|
+
KeyboardRows.tabNextFocusableComponent,
|
|
26
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
27
|
+
]} screenReaderRows={[
|
|
28
|
+
'The input uses the **`aria-invalid`** attribute to alert users that the values entered are not in the expected format.',
|
|
29
|
+
'The field and buttons use the **`aria-label`** attribute to provide accessible names.',
|
|
30
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as BadgeStories from './Badge.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={BadgeStories} isTemplate />
|
|
5
7
|
|
|
@@ -15,11 +17,7 @@ This component can be used independently, and does not require additional compon
|
|
|
15
17
|
|
|
16
18
|
### Accessibility
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
| Keys | Functions |
|
|
23
|
-
| ---- | --------- |
|
|
24
|
-
| Space or Enter | Selects the component. |
|
|
25
|
-
| Tab | Focuses the component and follows the page tab sequence. |
|
|
20
|
+
<AccessibilityTable keyboardRows={[
|
|
21
|
+
KeyboardRows.spaceEnterSelectsComponentSimple,
|
|
22
|
+
KeyboardRows.tabFocusesComponent,
|
|
23
|
+
]} keyboardDescription="Badge itself is not focusable. However, when components are added to it, these keys provide additional functionality." />
|
|
@@ -963,5 +963,157 @@ declare const _default: {
|
|
|
963
963
|
};
|
|
964
964
|
};
|
|
965
965
|
};
|
|
966
|
+
tableBaseBadge: {
|
|
967
|
+
active: {
|
|
968
|
+
borderColor: string;
|
|
969
|
+
backgroundColor: string;
|
|
970
|
+
border: string;
|
|
971
|
+
'& span': {
|
|
972
|
+
color: string;
|
|
973
|
+
};
|
|
974
|
+
cursor: string;
|
|
975
|
+
p: string;
|
|
976
|
+
alignItems: string;
|
|
977
|
+
justifyContent: string;
|
|
978
|
+
minWidth: string;
|
|
979
|
+
alignSelf: string;
|
|
980
|
+
display: string;
|
|
981
|
+
borderRadius: string;
|
|
982
|
+
fontWeight: number;
|
|
983
|
+
'& button': {
|
|
984
|
+
backgroundColor: string;
|
|
985
|
+
marginLeft: string;
|
|
986
|
+
marginTop: string;
|
|
987
|
+
padding: string;
|
|
988
|
+
'&.is-hovered': {
|
|
989
|
+
backgroundColor: string;
|
|
990
|
+
};
|
|
991
|
+
'& .mdi-icon': {
|
|
992
|
+
marginLeft: string;
|
|
993
|
+
padding: string;
|
|
994
|
+
};
|
|
995
|
+
};
|
|
996
|
+
};
|
|
997
|
+
warning: {
|
|
998
|
+
borderColor: string;
|
|
999
|
+
backgroundColor: string;
|
|
1000
|
+
border: string;
|
|
1001
|
+
'& span': {
|
|
1002
|
+
color: string;
|
|
1003
|
+
};
|
|
1004
|
+
cursor: string;
|
|
1005
|
+
p: string;
|
|
1006
|
+
alignItems: string;
|
|
1007
|
+
justifyContent: string;
|
|
1008
|
+
minWidth: string;
|
|
1009
|
+
alignSelf: string;
|
|
1010
|
+
display: string;
|
|
1011
|
+
borderRadius: string;
|
|
1012
|
+
fontWeight: number;
|
|
1013
|
+
'& button': {
|
|
1014
|
+
backgroundColor: string;
|
|
1015
|
+
marginLeft: string;
|
|
1016
|
+
marginTop: string;
|
|
1017
|
+
padding: string;
|
|
1018
|
+
'&.is-hovered': {
|
|
1019
|
+
backgroundColor: string;
|
|
1020
|
+
};
|
|
1021
|
+
'& .mdi-icon': {
|
|
1022
|
+
marginLeft: string;
|
|
1023
|
+
padding: string;
|
|
1024
|
+
};
|
|
1025
|
+
};
|
|
1026
|
+
};
|
|
1027
|
+
critical: {
|
|
1028
|
+
borderColor: string;
|
|
1029
|
+
backgroundColor: string;
|
|
1030
|
+
border: string;
|
|
1031
|
+
'& span': {
|
|
1032
|
+
color: string;
|
|
1033
|
+
};
|
|
1034
|
+
cursor: string;
|
|
1035
|
+
p: string;
|
|
1036
|
+
alignItems: string;
|
|
1037
|
+
justifyContent: string;
|
|
1038
|
+
minWidth: string;
|
|
1039
|
+
alignSelf: string;
|
|
1040
|
+
display: string;
|
|
1041
|
+
borderRadius: string;
|
|
1042
|
+
fontWeight: number;
|
|
1043
|
+
'& button': {
|
|
1044
|
+
backgroundColor: string;
|
|
1045
|
+
marginLeft: string;
|
|
1046
|
+
marginTop: string;
|
|
1047
|
+
padding: string;
|
|
1048
|
+
'&.is-hovered': {
|
|
1049
|
+
backgroundColor: string;
|
|
1050
|
+
};
|
|
1051
|
+
'& .mdi-icon': {
|
|
1052
|
+
marginLeft: string;
|
|
1053
|
+
padding: string;
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
healthy: {
|
|
1058
|
+
borderColor: string;
|
|
1059
|
+
backgroundColor: string;
|
|
1060
|
+
border: string;
|
|
1061
|
+
'& span': {
|
|
1062
|
+
color: string;
|
|
1063
|
+
};
|
|
1064
|
+
cursor: string;
|
|
1065
|
+
p: string;
|
|
1066
|
+
alignItems: string;
|
|
1067
|
+
justifyContent: string;
|
|
1068
|
+
minWidth: string;
|
|
1069
|
+
alignSelf: string;
|
|
1070
|
+
display: string;
|
|
1071
|
+
borderRadius: string;
|
|
1072
|
+
fontWeight: number;
|
|
1073
|
+
'& button': {
|
|
1074
|
+
backgroundColor: string;
|
|
1075
|
+
marginLeft: string;
|
|
1076
|
+
marginTop: string;
|
|
1077
|
+
padding: string;
|
|
1078
|
+
'&.is-hovered': {
|
|
1079
|
+
backgroundColor: string;
|
|
1080
|
+
};
|
|
1081
|
+
'& .mdi-icon': {
|
|
1082
|
+
marginLeft: string;
|
|
1083
|
+
padding: string;
|
|
1084
|
+
};
|
|
1085
|
+
};
|
|
1086
|
+
};
|
|
1087
|
+
secondary: {
|
|
1088
|
+
borderColor: string;
|
|
1089
|
+
backgroundColor: string;
|
|
1090
|
+
border: string;
|
|
1091
|
+
'& span': {
|
|
1092
|
+
color: string;
|
|
1093
|
+
};
|
|
1094
|
+
cursor: string;
|
|
1095
|
+
p: string;
|
|
1096
|
+
alignItems: string;
|
|
1097
|
+
justifyContent: string;
|
|
1098
|
+
minWidth: string;
|
|
1099
|
+
alignSelf: string;
|
|
1100
|
+
display: string;
|
|
1101
|
+
borderRadius: string;
|
|
1102
|
+
fontWeight: number;
|
|
1103
|
+
'& button': {
|
|
1104
|
+
backgroundColor: string;
|
|
1105
|
+
marginLeft: string;
|
|
1106
|
+
marginTop: string;
|
|
1107
|
+
padding: string;
|
|
1108
|
+
'&.is-hovered': {
|
|
1109
|
+
backgroundColor: string;
|
|
1110
|
+
};
|
|
1111
|
+
'& .mdi-icon': {
|
|
1112
|
+
marginLeft: string;
|
|
1113
|
+
padding: string;
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
};
|
|
1117
|
+
};
|
|
966
1118
|
};
|
|
967
1119
|
export default _default;
|
|
@@ -265,6 +265,13 @@ var dataTable = {
|
|
|
265
265
|
borderColor: 'success.dark'
|
|
266
266
|
})
|
|
267
267
|
};
|
|
268
|
+
var tableBaseBadge = {
|
|
269
|
+
active: _objectSpread({}, infoCalloutBadge),
|
|
270
|
+
warning: _objectSpread({}, warningStatusBadge),
|
|
271
|
+
critical: _objectSpread({}, criticalStatusBadge),
|
|
272
|
+
healthy: _objectSpread({}, healthyStatusBadge),
|
|
273
|
+
secondary: _objectSpread({}, secondaryStatusBadge)
|
|
274
|
+
};
|
|
268
275
|
var _default = exports["default"] = {
|
|
269
276
|
activeStatusBadge: activeStatusBadge,
|
|
270
277
|
badgeDeleteButton: badgeDeleteButton,
|
|
@@ -291,5 +298,6 @@ var _default = exports["default"] = {
|
|
|
291
298
|
secondaryStatusBadge: secondaryStatusBadge,
|
|
292
299
|
removableBadge: removableBadge,
|
|
293
300
|
invertedRemovableBadge: invertedRemovableBadge,
|
|
294
|
-
dataTable: dataTable
|
|
301
|
+
dataTable: dataTable,
|
|
302
|
+
tableBaseBadge: tableBaseBadge
|
|
295
303
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as BreadcrumbsStories from './Breadcrumbs.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={BreadcrumbsStories} isTemplate />
|
|
5
7
|
|
|
@@ -22,20 +24,12 @@ This component requires Item originating from [react-stately/collections](https:
|
|
|
22
24
|
|
|
23
25
|
This component should adhere to the [WAI-ARIA Breadcrumbs](https://www.w3.org/WAI/ARIA/apg/example-index/breadcrumb/index.html) accessibility guidelines.
|
|
24
26
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
#### Screen readers
|
|
36
|
-
|
|
37
|
-
This component uses the following attributes to assist screen readers:
|
|
38
|
-
|
|
39
|
-
- The Breadcrumbs and BreadcrumbItems components use the **`aria-label`** attribute to provide an accessible name.
|
|
40
|
-
- The Icon component uses the **`aria-hidden`** attribute to hide its content from assistive technology.
|
|
41
|
-
- The last BreadcrumbItem component uses the **`aria-current`** attribute to indicate that the user is currently viewing that page.
|
|
27
|
+
<AccessibilityTable keyboardRows={[
|
|
28
|
+
{ key: 'Space or Enter', description: 'Selects the item and navigates to the associated location.' },
|
|
29
|
+
KeyboardRows.tabNextFocusableComponent,
|
|
30
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
31
|
+
]} screenReaderRows={[
|
|
32
|
+
'The Breadcrumbs and BreadcrumbItems components use the **`aria-label`** attribute to provide an accessible name.',
|
|
33
|
+
'The Icon component uses the **`aria-hidden`** attribute to hide its content from assistive technology.',
|
|
34
|
+
'The last BreadcrumbItem component uses the **`aria-current`** attribute to indicate that the user is currently viewing that page.',
|
|
35
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as ButtonStories from './Button.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={ButtonStories} isTemplate />
|
|
5
7
|
|
|
@@ -26,16 +28,10 @@ This component can be used independently and does not require additional compone
|
|
|
26
28
|
|
|
27
29
|
This component should adhere to the [WAI-ARIA Button](https://www.w3.org/TR/wai-aria-practices-1.1/examples/button/button.html) accessibility guidelines.
|
|
28
30
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
| Space or Enter | Selects the button. |
|
|
36
|
-
| Tab | Focuses the button and follows the page tab sequence. |
|
|
37
|
-
|
|
38
|
-
#### Screen readers.
|
|
39
|
-
|
|
40
|
-
This component uses the **`aria-label`** attribute to provide an accessible name.
|
|
31
|
+
<AccessibilityTable keyboardRows={[
|
|
32
|
+
KeyboardRows.spaceEnterSelectsButton,
|
|
33
|
+
KeyboardRows.tabFocusesButton,
|
|
34
|
+
]} screenReaderRows={[
|
|
35
|
+
ScreenReaderRows.componentAriaLabel,
|
|
36
|
+
]} />
|
|
41
37
|
|
|
@@ -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/Calendar/Calendar" />
|
|
4
6
|
|
|
@@ -15,25 +17,18 @@ This component can be used independently and does not require additional compone
|
|
|
15
17
|
|
|
16
18
|
### Accessibility
|
|
17
19
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
| Shift+ page down | Changes the grid of dates to the same month in the next year. |
|
|
34
|
-
|
|
35
|
-
#### Screen Readers
|
|
36
|
-
|
|
37
|
-
This component uses the following attributes to assist screen readers:
|
|
38
|
-
- The **`aria-label`** attribute is used to provide an accessible name.
|
|
39
|
-
- In each data cell, the **`aria-selected`** attribute is set to “true” when a date is selected, and **`aria-disabled`** is set to “false” by default.
|
|
20
|
+
<AccessibilityTable keyboardRows={[
|
|
21
|
+
{ key: 'Space or Enter', description: 'Selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused.' },
|
|
22
|
+
KeyboardRows.tabCalendar,
|
|
23
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
24
|
+
KeyboardRows.homeFirstCalendarDate,
|
|
25
|
+
{ key: 'Pressing End:(Fn + left Arrow Key) Or Control or Command + End', description: 'Shifts the focus to the last calendar date.' },
|
|
26
|
+
{ key: 'Arrow key', description: 'Navigates up, down, right, and left across the calendar.' },
|
|
27
|
+
KeyboardRows.pageUpPreviousMonth,
|
|
28
|
+
KeyboardRows.pageDownNextMonth,
|
|
29
|
+
KeyboardRows.shiftPageUpPreviousYear,
|
|
30
|
+
KeyboardRows.shiftPageDownNextYear,
|
|
31
|
+
]} screenReaderRows={[
|
|
32
|
+
ScreenReaderRows.ariaLabelAccessibleName,
|
|
33
|
+
'In each data cell, the **`aria-selected`** attribute is set to “true” when a date is selected, and **`aria-disabled`** is set to “false” by default.',
|
|
34
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as CalloutStories from './Callout.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={CalloutStories} isTemplate />
|
|
5
7
|
|
|
@@ -14,16 +16,9 @@ This component requires the [Text](./?path=/docs/components-text--default) compo
|
|
|
14
16
|
|
|
15
17
|
### Accessibility
|
|
16
18
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
| ---- | --------- |
|
|
24
|
-
| Space or Enter | Selects the component within. |
|
|
25
|
-
| Tab | Focuses the component within and follows the page tab sequence. |
|
|
26
|
-
|
|
27
|
-
#### Screen readers
|
|
28
|
-
|
|
29
|
-
This component uses the **`aria-label`** attribute to provide an accessible name.
|
|
19
|
+
<AccessibilityTable keyboardRows={[
|
|
20
|
+
{ key: 'Space or Enter', description: 'Selects the component within.' },
|
|
21
|
+
{ key: 'Tab', description: 'Focuses the component within and follows the page tab sequence.' },
|
|
22
|
+
]} screenReaderRows={[
|
|
23
|
+
ScreenReaderRows.componentAriaLabel,
|
|
24
|
+
]} keyboardDescription="The callout itself is not focusable but the components within it are. These keys provide additional functionality to the component." />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as CardStories from './Card.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={CardStories} isTemplate />
|
|
5
7
|
|
|
@@ -23,14 +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
|
-
| Keys | Functions |
|
|
31
|
-
| ---- | --------- |
|
|
32
|
-
| Space or Enter | Selects the button. |
|
|
33
|
-
| Tab | Focuses the button and follows the page tab sequence.|
|
|
28
|
+
<AccessibilityTable keyboardRows={[
|
|
29
|
+
KeyboardRows.spaceEnterSelectsButton,
|
|
30
|
+
KeyboardRows.tabFocusesButton,
|
|
31
|
+
]} keyboardDescription="These keys provide additional functionality to the Interactive Card components." />
|
|
34
32
|
|
|
35
33
|
### Note
|
|
36
34
|
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as CheckboxFieldStories from './CheckboxField.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={CheckboxFieldStories} isTemplate />
|
|
5
7
|
|
|
@@ -25,19 +27,12 @@ This component can be used independently and does not require additional compone
|
|
|
25
27
|
|
|
26
28
|
This component should adhere to the [WAI-ARIA Checkbox](https://www.w3.org/WAI/ARIA/apg/patterns/checkbox/) accessibility guidelines.
|
|
27
29
|
|
|
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-checked`** attribute is used to indicate the current checked status.
|
|
42
|
-
- The **`aria-labelledby`** attribute is provided with the label ID to reference it.
|
|
43
|
-
- The **`aria-hidden`** attribute is used to hide its content from assistive technology.
|
|
30
|
+
<AccessibilityTable keyboardRows={[
|
|
31
|
+
{ key: 'Space', description: 'When focused, toggles the check box on and off.' },
|
|
32
|
+
KeyboardRows.tabNextFocusableComponent,
|
|
33
|
+
KeyboardRows.shiftTabFocusPrevious,
|
|
34
|
+
]} screenReaderRows={[
|
|
35
|
+
'The **`aria-checked`** attribute is used to indicate the current checked status.',
|
|
36
|
+
'The **`aria-labelledby`** attribute is provided with the label ID to reference it.',
|
|
37
|
+
'The **`aria-hidden`** attribute is used to hide its content from assistive technology.',
|
|
38
|
+
]} />
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as CodeEditorStories from './CodeEditor.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
4
|
+
import { ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
|
|
3
5
|
|
|
4
6
|
<Meta of={CodeEditorStories} isTemplate />
|
|
5
7
|
|
|
@@ -21,16 +23,9 @@ This component can be used independently and does not require additional compone
|
|
|
21
23
|
|
|
22
24
|
### Accessibility
|
|
23
25
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
| Enter | Inserts a new line of code |
|
|
31
|
-
| Arrow keys | Move the cursor within the code in the set direction |
|
|
32
|
-
|
|
33
|
-
#### Screen Readers
|
|
34
|
-
|
|
35
|
-
The **`aria-live`** attribute is used to announce content changes in a live region.
|
|
36
|
-
|
|
26
|
+
<AccessibilityTable keyboardRows={[
|
|
27
|
+
{ key: 'Enter', description: 'Inserts a new line of code' },
|
|
28
|
+
{ key: 'Arrow keys', description: 'Move the cursor within the code in the set direction' },
|
|
29
|
+
]} screenReaderRows={[
|
|
30
|
+
ScreenReaderRows.ariaLiveAnnounce,
|
|
31
|
+
]} />
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
2
|
import * as CodeViewStories from './CodeView.stories';
|
|
3
|
+
import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
|
|
3
4
|
|
|
4
5
|
<Meta of={CodeViewStories} isTemplate />
|
|
5
6
|
|
|
@@ -17,11 +18,7 @@ This component requires the [Text](./?path=/docs/components-text--default) compo
|
|
|
17
18
|
|
|
18
19
|
### Accessibility
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
| Keys | Functions |
|
|
25
|
-
| ---- | --------- |
|
|
26
|
-
| Space or Enter | Selects the CopyButton inside the CodeView component. |
|
|
27
|
-
| Tab | Focuses the CopyButton inside the CodeView component. |
|
|
21
|
+
<AccessibilityTable keyboardRows={[
|
|
22
|
+
{ key: 'Space or Enter', description: 'Selects the CopyButton inside the CodeView component.' },
|
|
23
|
+
{ key: 'Tab', description: 'Focuses the CopyButton inside the CodeView component.' },
|
|
24
|
+
]} />
|