@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.
Files changed (182) hide show
  1. package/lib/cjs/components/AIComponents/PromptInput/PromptInputReadMe.mdx +12 -15
  2. package/lib/cjs/components/AccordionGridGroup/AccordionGridGroup.mdx +13 -19
  3. package/lib/cjs/components/AccordionGroup/AccordionGroup.mdx +16 -17
  4. package/lib/cjs/components/ArrayField/ArrayField.mdx +10 -15
  5. package/lib/cjs/components/Badge/Badge.mdx +6 -8
  6. package/lib/cjs/components/Badge/Badge.styles.d.ts +152 -0
  7. package/lib/cjs/components/Badge/Badge.styles.js +9 -1
  8. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.mdx +11 -17
  9. package/lib/cjs/components/Button/Button.mdx +8 -12
  10. package/lib/cjs/components/Calendar/Calendar.mdx +17 -22
  11. package/lib/cjs/components/Callout/Callout.mdx +8 -13
  12. package/lib/cjs/components/Card/Card.mdx +6 -8
  13. package/lib/cjs/components/CheckboxField/CheckboxField.mdx +11 -16
  14. package/lib/cjs/components/CodeEditor/CodeEditor.mdx +8 -13
  15. package/lib/cjs/components/CodeView/CodeView.mdx +5 -8
  16. package/lib/cjs/components/CollapsiblePanel/CollapsiblePanel.mdx +10 -13
  17. package/lib/cjs/components/ColorField/ColorField.mdx +13 -18
  18. package/lib/cjs/components/ComboBoxField/ComboBoxField.mdx +13 -15
  19. package/lib/cjs/components/CopyText/CopyText.mdx +6 -8
  20. package/lib/cjs/components/DataTable/DataTable.mdx +17 -22
  21. package/lib/cjs/components/DatePicker/DatePicker.mdx +20 -27
  22. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +14 -19
  23. package/lib/cjs/components/ExpandableText/ExpandableText.mdx +9 -15
  24. package/lib/cjs/components/FileInputField/FileInputField.mdx +11 -16
  25. package/lib/cjs/components/Footer/Footer.mdx +9 -14
  26. package/lib/cjs/components/GridList/GridList.mdx +16 -21
  27. package/lib/cjs/components/HelpHint/HelpHint.mdx +8 -14
  28. package/lib/cjs/components/Icon/Icon.mdx +5 -3
  29. package/lib/cjs/components/IconButton/IconButton.mdx +7 -10
  30. package/lib/cjs/components/IconButtonToggle/IconButtonToggle.mdx +9 -15
  31. package/lib/cjs/components/Image/Image.mdx +4 -4
  32. package/lib/cjs/components/ImageUploadField/ImageUploadField.mdx +18 -24
  33. package/lib/cjs/components/Link/Link.mdx +5 -6
  34. package/lib/cjs/components/LinkSelectField/LinkSelectField.mdx +18 -24
  35. package/lib/cjs/components/ListItem/ListItem.mdx +6 -6
  36. package/lib/cjs/components/ListView/ListView.mdx +22 -23
  37. package/lib/cjs/components/Loader/Loader.mdx +6 -5
  38. package/lib/cjs/components/Menu/Menu.mdx +13 -18
  39. package/lib/cjs/components/Messages/Messages.mdx +9 -13
  40. package/lib/cjs/components/Modal/Modal.mdx +18 -19
  41. package/lib/cjs/components/MultivaluesField/MultivaluesField.mdx +14 -20
  42. package/lib/cjs/components/NavBar/NavBar.mdx +12 -17
  43. package/lib/cjs/components/NavSideBar/NavSideBar.mdx +12 -17
  44. package/lib/cjs/components/NavigationHeader/NavigationHeader.mdx +11 -16
  45. package/lib/cjs/components/NumberField/NumberField.mdx +16 -17
  46. package/lib/cjs/components/OverlayPanel/OverlayPanel.mdx +10 -14
  47. package/lib/cjs/components/Pagination/Pagination.js +4 -2
  48. package/lib/cjs/components/Pagination/Pagination.mdx +9 -13
  49. package/lib/cjs/components/Pagination/Pagination.styles.js +1 -1
  50. package/lib/cjs/components/PasswordField/PasswordField.mdx +10 -15
  51. package/lib/cjs/components/PopoverMenu/PopoverMenu.mdx +16 -22
  52. package/lib/cjs/components/ProgressBar/ProgressBar.mdx +6 -7
  53. package/lib/cjs/components/RadioGroupField/RadioGroupField.mdx +11 -17
  54. package/lib/cjs/components/RangeCalendar/RangeCalendar.mdx +17 -22
  55. package/lib/cjs/components/RockerButtonGroup/RockerButtonGroup.mdx +11 -16
  56. package/lib/cjs/components/SearchField/SearchField.mdx +8 -10
  57. package/lib/cjs/components/SelectField/SelectField.mdx +18 -23
  58. package/lib/cjs/components/Separator/Separator.mdx +4 -3
  59. package/lib/cjs/components/ServerErrorBoundary/ServerErrorBoundary.mdx +6 -8
  60. package/lib/cjs/components/SliderField/SliderField.mdx +12 -15
  61. package/lib/cjs/components/StatusIcon/StatusIcon.mdx +4 -3
  62. package/lib/cjs/components/Stepper/Stepper.mdx +18 -20
  63. package/lib/cjs/components/SwitchField/SwitchField.mdx +9 -14
  64. package/lib/cjs/components/TableBase/TableBase.js +4 -1
  65. package/lib/cjs/components/TableBase/TableBase.stories.js +8 -8
  66. package/lib/cjs/components/Tabs/Tabs.mdx +13 -18
  67. package/lib/cjs/components/TextAreaField/TextAreaField.mdx +8 -12
  68. package/lib/cjs/components/TextField/TextField.mdx +8 -12
  69. package/lib/cjs/components/TimeField/TimeField.mdx +12 -18
  70. package/lib/cjs/components/TooltipTrigger/TooltipTrigger.mdx +4 -3
  71. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.d.ts +42 -0
  72. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.js +38 -1
  73. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/cards.d.ts +3 -0
  74. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/cards.js +4 -0
  75. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.d.ts +3 -0
  76. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
  77. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +26 -3
  78. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +27 -5
  79. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +220 -18
  80. package/lib/cjs/styles/themes/next-gen/next-gen.js +1 -1
  81. package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +202 -0
  82. package/lib/cjs/styles/themes/next-gen/variants/badges.js +42 -1
  83. package/lib/cjs/styles/themes/next-gen/variants/cards.d.ts +1 -1
  84. package/lib/cjs/styles/themes/next-gen/variants/cards.js +3 -1
  85. package/lib/cjs/styles/themes/next-gen/variants/tableBase.d.ts +11 -17
  86. package/lib/cjs/styles/themes/next-gen/variants/tableBase.js +13 -17
  87. package/lib/cjs/styles/themes/next-gen/variants/text.d.ts +6 -0
  88. package/lib/cjs/styles/themes/next-gen/variants/text.js +6 -0
  89. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +11 -17
  90. package/lib/cjs/types/accessibilityTable.d.ts +8 -0
  91. package/lib/cjs/types/accessibilityTable.js +6 -0
  92. package/lib/cjs/types/index.d.ts +1 -0
  93. package/lib/cjs/types/index.js +75 -64
  94. package/lib/cjs/utils/docUtils/AccessibilityTable.d.ts +3 -0
  95. package/lib/cjs/utils/docUtils/AccessibilityTable.js +38 -0
  96. package/lib/cjs/utils/docUtils/AccessibilityTable.test.js +192 -0
  97. package/lib/cjs/utils/docUtils/accessibilityTableConstants.d.ts +130 -0
  98. package/lib/cjs/utils/docUtils/accessibilityTableConstants.js +137 -0
  99. package/lib/components/AIComponents/PromptInput/PromptInputReadMe.mdx +12 -15
  100. package/lib/components/AccordionGridGroup/AccordionGridGroup.mdx +13 -19
  101. package/lib/components/AccordionGroup/AccordionGroup.mdx +16 -17
  102. package/lib/components/ArrayField/ArrayField.mdx +10 -15
  103. package/lib/components/Badge/Badge.mdx +6 -8
  104. package/lib/components/Badge/Badge.styles.js +9 -1
  105. package/lib/components/Breadcrumbs/Breadcrumbs.mdx +11 -17
  106. package/lib/components/Button/Button.mdx +8 -12
  107. package/lib/components/Calendar/Calendar.mdx +17 -22
  108. package/lib/components/Callout/Callout.mdx +8 -13
  109. package/lib/components/Card/Card.mdx +6 -8
  110. package/lib/components/CheckboxField/CheckboxField.mdx +11 -16
  111. package/lib/components/CodeEditor/CodeEditor.mdx +8 -13
  112. package/lib/components/CodeView/CodeView.mdx +5 -8
  113. package/lib/components/CollapsiblePanel/CollapsiblePanel.mdx +10 -13
  114. package/lib/components/ColorField/ColorField.mdx +13 -18
  115. package/lib/components/ComboBoxField/ComboBoxField.mdx +13 -15
  116. package/lib/components/CopyText/CopyText.mdx +6 -8
  117. package/lib/components/DataTable/DataTable.mdx +17 -22
  118. package/lib/components/DatePicker/DatePicker.mdx +20 -27
  119. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.mdx +14 -19
  120. package/lib/components/ExpandableText/ExpandableText.mdx +9 -15
  121. package/lib/components/FileInputField/FileInputField.mdx +11 -16
  122. package/lib/components/Footer/Footer.mdx +9 -14
  123. package/lib/components/GridList/GridList.mdx +16 -21
  124. package/lib/components/HelpHint/HelpHint.mdx +8 -14
  125. package/lib/components/Icon/Icon.mdx +5 -3
  126. package/lib/components/IconButton/IconButton.mdx +7 -10
  127. package/lib/components/IconButtonToggle/IconButtonToggle.mdx +9 -15
  128. package/lib/components/Image/Image.mdx +4 -4
  129. package/lib/components/ImageUploadField/ImageUploadField.mdx +18 -24
  130. package/lib/components/Link/Link.mdx +5 -6
  131. package/lib/components/LinkSelectField/LinkSelectField.mdx +18 -24
  132. package/lib/components/ListItem/ListItem.mdx +6 -6
  133. package/lib/components/ListView/ListView.mdx +22 -23
  134. package/lib/components/Loader/Loader.mdx +6 -5
  135. package/lib/components/Menu/Menu.mdx +13 -18
  136. package/lib/components/Messages/Messages.mdx +9 -13
  137. package/lib/components/Modal/Modal.mdx +18 -19
  138. package/lib/components/MultivaluesField/MultivaluesField.mdx +14 -20
  139. package/lib/components/NavBar/NavBar.mdx +12 -17
  140. package/lib/components/NavSideBar/NavSideBar.mdx +12 -17
  141. package/lib/components/NavigationHeader/NavigationHeader.mdx +11 -16
  142. package/lib/components/NumberField/NumberField.mdx +16 -17
  143. package/lib/components/OverlayPanel/OverlayPanel.mdx +10 -14
  144. package/lib/components/Pagination/Pagination.js +4 -2
  145. package/lib/components/Pagination/Pagination.mdx +9 -13
  146. package/lib/components/Pagination/Pagination.styles.js +1 -1
  147. package/lib/components/PasswordField/PasswordField.mdx +10 -15
  148. package/lib/components/PopoverMenu/PopoverMenu.mdx +16 -22
  149. package/lib/components/ProgressBar/ProgressBar.mdx +6 -7
  150. package/lib/components/RadioGroupField/RadioGroupField.mdx +11 -17
  151. package/lib/components/RangeCalendar/RangeCalendar.mdx +17 -22
  152. package/lib/components/RockerButtonGroup/RockerButtonGroup.mdx +11 -16
  153. package/lib/components/SearchField/SearchField.mdx +8 -10
  154. package/lib/components/SelectField/SelectField.mdx +18 -23
  155. package/lib/components/Separator/Separator.mdx +4 -3
  156. package/lib/components/ServerErrorBoundary/ServerErrorBoundary.mdx +6 -8
  157. package/lib/components/SliderField/SliderField.mdx +12 -15
  158. package/lib/components/StatusIcon/StatusIcon.mdx +4 -3
  159. package/lib/components/Stepper/Stepper.mdx +18 -20
  160. package/lib/components/SwitchField/SwitchField.mdx +9 -14
  161. package/lib/components/TableBase/TableBase.js +4 -1
  162. package/lib/components/TableBase/TableBase.stories.js +8 -8
  163. package/lib/components/Tabs/Tabs.mdx +13 -18
  164. package/lib/components/TextAreaField/TextAreaField.mdx +8 -12
  165. package/lib/components/TextField/TextField.mdx +8 -12
  166. package/lib/components/TimeField/TimeField.mdx +12 -18
  167. package/lib/components/TooltipTrigger/TooltipTrigger.mdx +4 -3
  168. package/lib/styles/themeOverrides/nextGenDarkMode/variants/badges.js +38 -1
  169. package/lib/styles/themeOverrides/nextGenDarkMode/variants/cards.js +4 -0
  170. package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +3 -0
  171. package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +27 -5
  172. package/lib/styles/themes/next-gen/next-gen.js +1 -1
  173. package/lib/styles/themes/next-gen/variants/badges.js +42 -1
  174. package/lib/styles/themes/next-gen/variants/cards.js +3 -1
  175. package/lib/styles/themes/next-gen/variants/tableBase.js +13 -17
  176. package/lib/styles/themes/next-gen/variants/text.js +6 -0
  177. package/lib/types/accessibilityTable.js +1 -0
  178. package/lib/types/index.js +1 -0
  179. package/lib/utils/docUtils/AccessibilityTable.js +30 -0
  180. package/lib/utils/docUtils/AccessibilityTable.test.js +190 -0
  181. package/lib/utils/docUtils/accessibilityTableConstants.js +130 -0
  182. package/package.json +1 -1
@@ -73,12 +73,14 @@ var Pagination = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
73
73
  icon: _ChevronLeftIcon["default"],
74
74
  title: {
75
75
  name: 'Previous'
76
- }
76
+ },
77
+ size: "md"
77
78
  }, previousButtonIconProps))), (0, _react2.jsx)(_index.IconButton, nextButtonProps, (0, _react2.jsx)(_index.Icon, (0, _extends2["default"])({
78
79
  icon: _ChevronRightIcon["default"],
79
80
  title: {
80
81
  name: 'Next'
81
- }
82
+ },
83
+ size: "md"
82
84
  }, nextButtonIconProps))))));
83
85
  });
84
86
  var _default = exports["default"] = Pagination;
@@ -1,5 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as PaginationStories from './Pagination.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
3
4
 
4
5
  <Meta of={PaginationStories} isTemplate />
5
6
 
@@ -24,19 +25,14 @@ This component requires the following components:
24
25
 
25
26
  This component adheres to the [WCAG 2.1 - 2.4.4 Link Purpose (In Context)](https://www.w3.org/WAI/WCAG21/Understanding/link-purpose-in-context.html) accessibility guidelines.
26
27
 
27
- #### Keyboard Navigation
28
-
29
- | Key | Functions |
30
- |---------------|-----------------------------------|
31
- | Tab | Moves focus between controls. |
32
- | Enter | Activates the focused control. |
33
-
34
- #### Screen Readers
35
-
36
- This component uses the following attributes to assist screen readers:
37
- - **`aria-label`**: Provides an accessible name for the pagination controls.
38
- - **`aria-disabled`**: Indicates when navigation buttons are disabled.
39
- - **`aria-live`**: Updates screen readers with changes in pagination state.
28
+ <AccessibilityTable keyboardRows={[
29
+ { key: 'Tab', description: 'Moves focus between controls.' },
30
+ { key: 'Enter', description: 'Activates the focused control.' },
31
+ ]} screenReaderRows={[
32
+ '**`aria-label`**: Provides an accessible name for the pagination controls.',
33
+ '**`aria-disabled`**: Indicates when navigation buttons are disabled.',
34
+ '**`aria-live`**: Updates screen readers with changes in pagination state.',
35
+ ]} />
40
36
 
41
37
  ### Usage
42
38
 
@@ -13,7 +13,7 @@ var container = {
13
13
  flexGrow: 1
14
14
  };
15
15
  var iconWrapper = {
16
- ml: 'md'
16
+ ml: 'lg'
17
17
  };
18
18
  var wrapper = {
19
19
  ml: 'auto',
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as PasswordFieldStories from './PasswordField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={PasswordFieldStories} isTemplate />
5
7
 
@@ -17,18 +19,11 @@ This component can be used independently and does not require additional compone
17
19
 
18
20
  ### Accessibility
19
21
 
20
- #### Keyboard Navigation
21
-
22
- These keys provide additional functionality to the component.
23
-
24
- | Keys | Functions |
25
- | ---- | --------- |
26
- | Tab | The input is focusable using the Tab key and follows the page tab sequence. |
27
- | Shift + Tab | Moves focus to the previous focusable component.|
28
- | Space or Enter | Toggles the PasswordType component to hide or reveal the input. |
29
-
30
- #### Screen readers
31
-
32
- This component uses the following attributes to assist screen readers:
33
- - The input component uses the **`aria-labelledby`** attribute to reference the label ID.
34
- - The icon buttons use **`aria-label`** attribute to provide an accessible name.
22
+ <AccessibilityTable keyboardRows={[
23
+ KeyboardRows.tabInput,
24
+ KeyboardRows.shiftTabFocusPrevious,
25
+ { key: 'Space or Enter', description: 'Toggles the PasswordType component to hide or reveal the input.' },
26
+ ]} screenReaderRows={[
27
+ 'The input component uses the **`aria-labelledby`** attribute to reference the label ID.',
28
+ 'The icon buttons use **`aria-label`** attribute to provide an accessible name.',
29
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from "@storybook/addon-docs/blocks";
2
2
  import * as PopoverMenuStories from './PopoverMenu.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={PopoverMenuStories} isTemplate />
5
7
 
@@ -33,25 +35,17 @@ This component requires these components:
33
35
 
34
36
  This component should adhere to the [WAI-ARIA Dialog](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/dialog/) accessibility guidelines.
35
37
 
36
- #### Keyboard Navigation
37
-
38
- These keys provide additional functionality to the component.
39
-
40
- | Key | Functions |
41
- | -------------- | ----------------------------------------------------------------------------------------------------------------- |
42
- | Tab | The trigger and menu items are focusable using the Tab key. |
43
- | Shift + Tab | Moves focus to the previous focusable component. |
44
- | Space or Enter | Pressing Space or Enter on a focused trigger opens or closes the menu and selects the MenuItems it is focused on. |
45
- | Arrow keys | Moves the selection through the popover. |
46
- | Esc | Pressing the escape key closes the popover and focuses on the previous focusable component. |
47
-
48
- #### Screen Readers
49
-
50
- This component uses the following attributes to assist screen readers:
51
-
52
- - The **`aria-haspopup`** attribute is set to “True” to indicate that this component contains popover content.
53
- - The trigger uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
54
- - The menu ID is supplied to the **`aria-controls`** attribute pointing to the content.
55
- - The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
56
- - The default **`aria-disabled`** attribute is set to “False” by default.
57
- - The button ID is supplied to the **`aria-labelledby`** attribute to reference it.
38
+ <AccessibilityTable keyboardRows={[
39
+ { key: 'Tab', description: 'The trigger and menu items are focusable using the Tab key.' },
40
+ KeyboardRows.shiftTabFocusPrevious,
41
+ { key: 'Space or Enter', description: 'Pressing Space or Enter on a focused trigger opens or closes the menu and selects the MenuItems it is focused on.' },
42
+ KeyboardRows.arrowKeysMovePopoverSelection,
43
+ KeyboardRows.escClosePopoverFocusPrevious,
44
+ ]} screenReaderRows={[
45
+ 'The **`aria-haspopup`** attribute is set to “True” to indicate that this component contains popover content.',
46
+ 'The trigger uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.',
47
+ 'The menu ID is supplied to the **`aria-controls`** attribute pointing to the content.',
48
+ ScreenReaderRows.ariaOrientationNoTrailingSpace,
49
+ 'The default **`aria-disabled`** attribute is set to “False” by default.',
50
+ 'The button ID is supplied to the **`aria-labelledby`** attribute to reference it.',
51
+ ]} />
@@ -1,5 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as ProgressBarStories from './ProgressBar.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
3
4
 
4
5
  <Meta of={ProgressBarStories} isTemplate />
5
6
 
@@ -22,13 +23,11 @@ This component can be used independently and does not require additional compone
22
23
 
23
24
  This component should adhere to the [WAI-ARIA ProgressBar](https://w3c.github.io/aria/#progressbar) accessibility guidelines.
24
25
 
25
- #### Screen readers
26
-
27
- This component uses the following attributes to assist screen readers:
28
-
29
- - The progressBar uses the **`aria-valuemin`** and **`aria-valuemax`** to indicate the minimum and maximum progress indicator values. If they are missing, they default to 0 and 100 respectively.
30
- - The progressBar uses the **`aria-valuenow`** attribute to indicate the current value of the progressbar.
31
- - If the progressbar is describing the loading progress of a particular region of a page, authors SHOULD both use **`aria-describedby`** to reference the progressbar status, and set the **`aria-busy`** attribute to true on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar because it is always read-only
26
+ <AccessibilityTable screenReaderRows={[
27
+ 'The progressBar uses the **`aria-valuemin`** and **`aria-valuemax`** to indicate the minimum and maximum progress indicator values. If they are missing, they default to 0 and 100 respectively. ',
28
+ 'The progressBar uses the **`aria-valuenow`** attribute to indicate the current value of the progressbar.',
29
+ 'If the progressbar is describing the loading progress of a particular region of a page, authors SHOULD both use **`aria-describedby`** to reference the progressbar status, and set the **`aria-busy`** attribute to true on the region until it is finished loading. It is not possible for the user to alter the value of a progressbar because it is always read-only',
30
+ ]} />
32
31
 
33
32
  ### Determinate vs Indeterminate usage
34
33
 
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as RadioGroupFieldStories from './RadioGroupField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={RadioGroupFieldStories} isTemplate />
5
7
 
@@ -23,20 +25,12 @@ This component requires the RadioField component.
23
25
 
24
26
  This component should adhere to the [WAI-ARIA RadioGroup](https://www.w3.org/WAI/ARIA/apg/patterns/radio/) accessibility guidelines.
25
27
 
26
- #### Keyboard Navigation
27
-
28
- These keys provide additional functionality to the component.
29
-
30
- | Keys | Functions |
31
- | ---- | --------- |
32
- | Tab | The field is focusable using the Tab key and follows the page tab sequence. |
33
- | Shift + Tab | Moves focus to the previous focusable component. |
34
- | Arrow Keys | Once focused, the radio button can be selected using any of the arrow keys. |
35
- | Space | If the radio button is focused, pressing space selects or deselects it. |
36
-
37
- #### Screen readers
38
-
39
- This component uses the following attributes to assist screen readers:
40
-
41
- - The **`aria-labelledby`** attribute is used to reference the label, and the **`aria-orientation`** attribute is set to “Vertical” by default.
42
- - Each radio input also uses the **`aria-labelledby`** attribute pointing to its label.
28
+ <AccessibilityTable keyboardRows={[
29
+ KeyboardRows.tabField,
30
+ KeyboardRows.shiftTabFocusPrevious,
31
+ { key: 'Arrow Keys', description: 'Once focused, the radio button can be selected using any of the arrow keys.' },
32
+ { key: 'Space', description: 'If the radio button is focused, pressing space selects or deselects it.' },
33
+ ]} screenReaderRows={[
34
+ 'The **`aria-labelledby`** attribute is used to reference the label, and the **`aria-orientation`** attribute is set to “Vertical” by default.',
35
+ 'Each radio input also uses the **`aria-labelledby`** attribute pointing to its label.',
36
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as RangeCalendarStories from './RangeCalendar.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={RangeCalendarStories} isTemplate />
5
7
 
@@ -16,25 +18,18 @@ This component can be used independently and does not require additional compone
16
18
 
17
19
  ### Accessibility
18
20
 
19
- #### Keyboard Navigation
20
-
21
- These keys provide additional functionality to the component.
22
-
23
- | Keys | Functions |
24
- | ---- | --------- |
25
- | Space or Enter | Selects the start and end dates when a date is focused, and navigates to the calendar pages when the navigational buttons are focused. |
26
- | Tab | Components in the calendar are focusable and follow the page tab sequence. |
27
- | Shift + Tab | Moves focus to the previous focusable component. |
28
- | Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home | Shifts the focus to the first calendar date of the currently focused month. |
29
- | Pressing End:(Fn + left Arrow Key) Or Control or Command + End | Shifts the focus to the last calendar date of the currently focused month. |
30
- | Arrow key | Navigates up, down, right, and left across the calendar. If at the end of the current calendar, the right arrow key navigates to the next calendar. If at the beginning of the current calendar, the left arrow key navigates to the previous calendar. |
31
- | Page up | Changes focus to the same date in the previous month. |
32
- | Page down | Changes focus to the same date in the next month. |
33
- | Shift + page up | Changes the grid of dates to the same months in the previous year. |
34
- | Shift+ page down | Changes the grid of dates to the same months in the next year. |
35
-
36
- #### Screen Readers
37
-
38
- This component uses the following attributes to assist screen readers:
39
- - The **`aria-label`** attribute is used to provide an accessible name.
40
- - In each data cell, the **`aria-selected`** attribute is set to “true” for all dates within the selected range, and **`aria-disabled`** is set to “false” by default.
21
+ <AccessibilityTable keyboardRows={[
22
+ { key: 'Space or Enter', description: 'Selects the start and end dates when a date is focused, and navigates to the calendar pages when the navigational buttons are focused.' },
23
+ KeyboardRows.tabCalendar,
24
+ KeyboardRows.shiftTabFocusPrevious,
25
+ { key: 'Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home', description: 'Shifts the focus to the first calendar date of the currently focused month.' },
26
+ { key: 'Pressing End:(Fn + left Arrow Key) Or Control or Command + End', description: 'Shifts the focus to the last calendar date of the currently focused month.' },
27
+ { key: 'Arrow key', description: 'Navigates up, down, right, and left across the calendar. If at the end of the current calendar, the right arrow key navigates to the next calendar. If at the beginning of the current calendar, the left arrow key navigates to the previous calendar.' },
28
+ { key: 'Page up', description: 'Changes focus to the same date in the previous month.' },
29
+ { key: 'Page down', description: 'Changes focus to the same date in the next month.' },
30
+ { key: 'Shift + page up', description: 'Changes the grid of dates to the same months in the previous year.' },
31
+ { key: 'Shift+ page down', description: 'Changes the grid of dates to the same months in the next year.' },
32
+ ]} screenReaderRows={[
33
+ ScreenReaderRows.ariaLabelAccessibleName,
34
+ 'In each data cell, the **`aria-selected`** attribute is set to “true” for all dates within the selected range, and **`aria-disabled`** is set to “false” by default.',
35
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as RockerButtonGroupStories from './RockerButtonGroup.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={RockerButtonGroupStories} isTemplate />
5
7
 
@@ -19,19 +21,12 @@ This component requires the RockerButton component.
19
21
 
20
22
  ### Accessibility
21
23
 
22
- #### Keyboard Navigation
23
-
24
- These keys provide additional functionality to the component.
25
-
26
- | Key | Functions |
27
- | ---- | ---- |
28
- | Tab | The group is focusable using the Tab key and follows the page tab sequence. |
29
- | Arrow keys & Enter or Space| After the RockerButtonGroup has focus, individual rocker buttons can be focused using the right and left arrow keys, and selected by either pressing the Enter key or Space. |
30
- | Arrow keys | The right and left arrow keys can loop back to the beginning and end of the group |
31
-
32
- #### Screen Readers
33
-
34
- This component uses the following attributes to assist screen readers:
35
- - The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
36
- - The default **`aria-disabled`** attribute is set to “False” by default.
37
- - The buttons use the **`aria-pressed`** attribute to indicate the current status of the toggle button.
24
+ <AccessibilityTable keyboardRows={[
25
+ { key: 'Tab', description: 'The group is focusable using the Tab key and follows the page tab sequence.' },
26
+ { key: 'Arrow keys & Enter or Space', description: 'After the RockerButtonGroup has focus, individual rocker buttons can be focused using the right and left arrow keys, and selected by either pressing the Enter key or Space.' },
27
+ { key: 'Arrow keys', description: 'The right and left arrow keys can loop back to the beginning and end of the group' },
28
+ ]} screenReaderRows={[
29
+ ScreenReaderRows.ariaOrientationWithTrailingSpace,
30
+ 'The default **`aria-disabled`** attribute is set to “False” by default. ',
31
+ 'The buttons use the **`aria-pressed`** attribute to indicate the current status of the toggle button.',
32
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as SearchFieldStories from './SearchField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={SearchFieldStories} isTemplate />
5
7
 
@@ -22,13 +24,9 @@ This component can be used independently and does not require additional compone
22
24
 
23
25
  ### Accessibility
24
26
 
25
- #### Keyboard Navigation
26
-
27
- These keys provide additional functionality to the component.
28
-
29
- | Keys | Functions |
30
- | ---- | --------- |
31
- | Tab | The field is focusable using the Tab key and follows the page tab sequence. |
32
- | Shift + Tab | Moves focus to the previous focusable component. |
33
- | Enter or Space | Once the user starts typing, the previously hidden clear button can be focused and selected by pressing the Enter or Space key. |
34
- | Esc and Enter | The field can be cleared by pressing the Escape key and handles submit events on Enter. |
27
+ <AccessibilityTable keyboardRows={[
28
+ KeyboardRows.tabField,
29
+ KeyboardRows.shiftTabFocusPrevious,
30
+ { key: 'Enter or Space', description: 'Once the user starts typing, the previously hidden clear button can be focused and selected by pressing the Enter or Space key.' },
31
+ { key: 'Esc and Enter', description: 'The field can be cleared by pressing the Escape key and handles submit events on Enter.' },
32
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as SelectFieldStories from './SelectField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={SelectFieldStories} isTemplate />
5
7
 
@@ -22,26 +24,19 @@ This component requires the OverlayProvider and Item originating from [react-sta
22
24
 
23
25
  ### Accessibility
24
26
 
25
- #### Keyboard Navigation
26
-
27
- These keys provide additional functionality to the component.
28
-
29
- | Keys | Functions |
30
- | ---- | --------- |
31
- | Tab | The field is focusable using the Tab key and follows the page tab sequence. |
32
- | Shift + Tab | Moves focus to the previous focusable component.|
33
- | Space or Enter | Pressing Space or Enter when the trigger button is focused opens or closes the menu. Pressing Space or Enter when the menu item is focused selects the listbox option. |
34
- | Arrow keys | Can be used to move through the listbox selection. |
35
- | Typing in input field | Adds focus to it and opens the popover. |
36
- | Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
37
- | End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
38
- | Esc | Pressing the escape key closes the popover menu and adds focus to the input.|
39
-
40
- #### Screen readers
41
-
42
- This component uses the following attributes to assist screen readers:
43
- - The trigger button uses the **`aria-labelledby`** attribute to reference the label ID, the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover,
44
- - The **`aria-haspopup`** attribute indicates the type of popup content as a listbox. Once expanded, the **`aria-controls`** attribute is added to the button pointing to the popover.
45
- - The component uses the **`aria-invalid`** attribute to detect incorrect values or status errors, and is set to “False” by default.
46
- - The listbox uses the **`aria-labelledby`** attribute pointing to the label ID.
47
- - Each option in the list 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. The default **`aria-disabled`** value is false for each option.
27
+ <AccessibilityTable keyboardRows={[
28
+ KeyboardRows.tabField,
29
+ KeyboardRows.shiftTabFocusPrevious,
30
+ { key: 'Space or Enter', description: 'Pressing Space or Enter when the trigger button is focused opens or closes the menu. Pressing Space or Enter when the menu item is focused selects the listbox option.' },
31
+ { key: 'Arrow keys', description: 'Can be used to move through the listbox selection.' },
32
+ KeyboardRows.typingOpenPopover,
33
+ KeyboardRows.homeFirstListboxItem,
34
+ KeyboardRows.endLastListboxItem,
35
+ { key: 'Esc', description: 'Pressing the escape key closes the popover menu and adds focus to the input.' },
36
+ ]} screenReaderRows={[
37
+ "The trigger button uses the **`aria-labelledby`** attribute to reference the label ID, the **`aria-expanded`** attribute to indicate the expansion or collapse of the popover, ",
38
+ "The **`aria-haspopup`** attribute indicates the type of popup content as a listbox. Once expanded, the **`aria-controls`** attribute is added to the button pointing to the popover. ",
39
+ "The component uses the **`aria-invalid`** attribute to detect incorrect values or status errors, and is set to “False” by default.",
40
+ "The listbox uses the **`aria-labelledby`** attribute pointing to the label ID.",
41
+ "Each option in the list 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. The default **`aria-disabled`** value is false for each option.",
42
+ ]} />
@@ -1,5 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as SeparatorStories from './Separator.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
3
4
 
4
5
  <Meta of={SeparatorStories} isTemplate />
5
6
 
@@ -15,6 +16,6 @@ This component can be used independently and does not require additional compone
15
16
 
16
17
  ### Accessibility
17
18
 
18
- #### Screen Readers
19
-
20
- The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous
19
+ <AccessibilityTable screenReaderRows={[
20
+ 'The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous',
21
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from "@storybook/addon-docs/blocks";
2
2
  import * as ServerErrorBoundaryStories from './ServerErrorBoundary.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={ServerErrorBoundaryStories} isTemplate />
5
7
 
@@ -15,11 +17,7 @@ This component can be used independently and does not require additional compone
15
17
 
16
18
  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.
17
19
 
18
- #### Keyboard Navigation
19
-
20
- These keys provide additional functionality to the component.
21
-
22
- | Keys | Functions |
23
- | -------------- | ----------------------------------------------------- |
24
- | Space or Enter | Selects the button. |
25
- | Tab | Focuses the button and follows the page tab sequence. |
20
+ <AccessibilityTable keyboardRows={[
21
+ KeyboardRows.spaceEnterSelectsButton,
22
+ KeyboardRows.tabFocusesButton,
23
+ ]} />
@@ -1,5 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as SliderFieldStories from './SliderField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
3
4
 
4
5
  <Meta of={SliderFieldStories} isTemplate />
5
6
 
@@ -57,20 +58,16 @@ The `SliderField` component is used to allow users to select a value from a rang
57
58
 
58
59
  This component adheres to accessibility guidelines to ensure a better user experience for all users.
59
60
 
60
- #### Keyboard Navigation
61
-
62
- | Keys | Function |
63
- | ------------ | ----------------------------------------------------------------------- |
64
- | Tab | Moves focus to the slider. |
65
- | Arrow Keys | Adjusts the slider value incrementally. |
66
- | Home | Moves the slider to the minimum value. |
67
- | End | Moves the slider to the maximum value. |
68
-
69
- #### Screen Readers
70
-
71
- - **`aria-valuenow`**: Announces the current value of the slider.
72
- - **`aria-valuemin` and `aria-valuemax`**: Define the minimum and maximum values of the slider.
73
- - **`aria-orientation`**: Indicates whether the slider is horizontal or vertical.
61
+ <AccessibilityTable keyboardRows={[
62
+ { key: 'Tab', description: 'Moves focus to the slider.' },
63
+ { key: 'Arrow Keys', description: 'Adjusts the slider value incrementally.' },
64
+ { key: 'Home', description: 'Moves the slider to the minimum value.' },
65
+ { key: 'End', description: 'Moves the slider to the maximum value.' },
66
+ ]} screenReaderRows={[
67
+ '**`aria-valuenow`**: Announces the current value of the slider.',
68
+ '**`aria-valuemin` and `aria-valuemax`**: Define the minimum and maximum values of the slider.',
69
+ '**`aria-orientation`**: Indicates whether the slider is horizontal or vertical.',
70
+ ]} />
74
71
 
75
72
  ### Example Usage
76
73
 
@@ -125,4 +122,4 @@ This component adheres to accessibility guidelines to ensure a better user exper
125
122
  minValue={0}
126
123
  maxValue={100}
127
124
  />
128
- ```
125
+ ```
@@ -1,5 +1,6 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as StatusIconStories from './StatusIcon.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
3
4
 
4
5
  <Meta of={StatusIconStories} isTemplate />
5
6
 
@@ -15,6 +16,6 @@ It is built on top of the [Box from Theme-UI](https://theme-ui.com/components/bo
15
16
 
16
17
  This component can be used independently and does not require additional components.
17
18
 
18
- #### Screen Readers
19
-
20
- If the icon has a title associated with it, the **`aria-labelledby`** attribute is used to provide the label ID.
19
+ <AccessibilityTable screenReaderRows={[
20
+ 'If the icon has a title associated with it, the **`aria-labelledby`** attribute is used to provide the label ID.',
21
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from "@storybook/addon-docs/blocks";
2
2
  import * as StepperStories from './Stepper.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={StepperStories} isTemplate />
5
7
 
@@ -23,26 +25,22 @@ This component requires the Item originating from [react-stately/collections](ht
23
25
 
24
26
  This component should adhere to the [WAI-ARIA Stepper](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/) accessibility guidelines.
25
27
 
26
- #### Keyboard Navigation
27
-
28
- These keys provide additional functionality to the component.
29
-
30
- | Keys | Function |
31
- | ---------------------------------------------------- | ------------------------------------------------------------------------------------- |
32
- | Tab | The field is focusable using the Tab key and follows the page tab sequence. |
33
- | Arrow keys | When this field is focused, the arrow keys can be used to navigate through the steps. |
34
- | Shift + Tab | Moves focus to the previous focusable component. |
35
- | Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first step. |
36
- | End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last step. |
37
-
38
- #### Screen Readers
39
-
40
- This component uses the following attributes to assist screen readers:
41
-
42
- - The **`aria-orientation`** attribute indicates whether the orientation is horizontal, vertical, unknown, or ambiguous.
43
- - Each step uses the **`aria-selected`** attribute to indicate the selection status, and the **`aria-control`** attribute is supplied with the associated panel ID that displays the content.
44
- - Each step uses the **`aria-labelledby`** with the label ID to reference it.
45
-
28
+ <AccessibilityTable
29
+ keyboardRows={[
30
+ KeyboardRows.tabField,
31
+ { key: 'Arrow keys', description: 'When this field is focused, the arrow keys can be used to navigate through the steps.' },
32
+ KeyboardRows.shiftTabFocusPrevious,
33
+ { key: 'Home(Fn + Right Arrow Key) Or Control/Command + Home', description: 'Shifts the focus to the first step.' },
34
+ { key: 'End(Fn + Left Arrow Key) Or Control/Command + End', description: 'Shifts the focus to the last step.' },
35
+ ]}
36
+ screenReaderRows={[
37
+ ScreenReaderRows.ariaOrientationNoTrailingSpace,
38
+ 'Each step uses the **`aria-selected`** attribute to indicate the selection status, and the **`aria-control`** attribute is supplied with the associated panel ID that displays the content.',
39
+ 'Each step uses the **`aria-labelledby`** with the label ID to reference it.',
40
+ ]}
41
+ />
42
+
43
+ {/* Non-standard section: '#### Usage' contains layout guidance. Flagged for future migration. */}
46
44
  #### Usage
47
45
 
48
46
  - The stepper component is always center-aligned in its context, whether it's in a page, a panel, or a popup.
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as SwitchFieldStories from './SwitchField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={SwitchFieldStories} isTemplate />
5
7
 
@@ -21,17 +23,10 @@ This component can be used independently and does not require additional compone
21
23
 
22
24
  This component should adhere to the [WAI-ARIA Switch](https://www.w3.org/WAI/ARIA/apg/patterns/switch/) accessibility guidelines.
23
25
 
24
- #### Keyboard Navigation
25
-
26
- These keys provide additional functionality to the component.
27
-
28
- | Keys | Functions |
29
- | ---- | --------- |
30
- | Tab | The field is focusable using the Tab key and follows the page tab sequence. |
31
- | Shift + Tab | Moves focus to the previous focusable component.|
32
- | Space | When focused, Space toggles the switched field. |
33
-
34
- #### Screen readers
35
-
36
- The hidden input uses the **`aria-labelledby`** attribute to associate the label, the **`aria-label`** attribute to provide an accessible name,
37
- and the **`aria-checked`** attribute for the switched state.
26
+ <AccessibilityTable keyboardRows={[
27
+ KeyboardRows.tabField,
28
+ KeyboardRows.shiftTabFocusPrevious,
29
+ { key: 'Space', description: 'When focused, Space toggles the switched field.' },
30
+ ]} screenReaderRows={[
31
+ 'The hidden input uses the **`aria-labelledby`** attribute to associate the label, the **`aria-label`** attribute to provide an accessible name, and the **`aria-checked`** attribute for the switched state.',
32
+ ]} />
@@ -338,7 +338,10 @@ function TableColumnHeader(props) {
338
338
  isRow: true,
339
339
  gap: "sm",
340
340
  alignItems: "center"
341
- }, (0, _react2.jsx)(_.Text, null, column.rendered), allowsSorting && sortIcon), allowsResizing && (0, _react2.jsx)(Resizer, {
341
+ }, (0, _react2.jsx)(_.Text, {
342
+ as: "h4",
343
+ variant: "headText"
344
+ }, column.rendered), allowsSorting && sortIcon), allowsResizing && (0, _react2.jsx)(Resizer, {
342
345
  column: column,
343
346
  layoutState: layoutState,
344
347
  onResizeStart: onResizeStart,