@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
@@ -258,6 +258,13 @@ var dataTable = {
258
258
  borderColor: 'success.dark'
259
259
  })
260
260
  };
261
+ var tableBaseBadge = {
262
+ active: _objectSpread({}, infoCalloutBadge),
263
+ warning: _objectSpread({}, warningStatusBadge),
264
+ critical: _objectSpread({}, criticalStatusBadge),
265
+ healthy: _objectSpread({}, healthyStatusBadge),
266
+ secondary: _objectSpread({}, secondaryStatusBadge)
267
+ };
261
268
  export default {
262
269
  activeStatusBadge: activeStatusBadge,
263
270
  badgeDeleteButton: badgeDeleteButton,
@@ -284,5 +291,6 @@ export default {
284
291
  secondaryStatusBadge: secondaryStatusBadge,
285
292
  removableBadge: removableBadge,
286
293
  invertedRemovableBadge: invertedRemovableBadge,
287
- dataTable: dataTable
294
+ dataTable: dataTable,
295
+ tableBaseBadge: tableBaseBadge
288
296
  };
@@ -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
- #### Keyboard Navigation
26
-
27
- These keys provide additional functionality to the component.
28
-
29
- | Keys | Functions |
30
- | ---- | --------- |
31
- | Space or Enter | Selects the item and navigates to the associated location. |
32
- | Tab | Moves focus to the next focusable component and follows the page tab sequence. |
33
- | Shift + Tab | Moves focus to the previous focusable component. |
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
- #### Keyboard Navigation
30
-
31
- These keys provide additional functionality to the component.
32
-
33
- | Keys | Functions |
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
- #### Keyboard Navigation
19
-
20
- These keys provide additional functionality to the component.
21
-
22
- | Keys | Functions |
23
- | ---- | --------- |
24
- | Space or Enter | Selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused. |
25
- | Tab | Components in the calendar are focusable and follow the page tab sequence. |
26
- | Shift + Tab | Moves focus to the previous focusable component. |
27
- | Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home | Shifts the focus to the first calendar date. |
28
- | Pressing End:(Fn + left Arrow Key) Or Control or Command + End | Shifts the focus to the last calendar date. |
29
- | Arrow key | Navigates up, down, right, and left across the calendar. |
30
- | Page up | Changes the grid of dates to the previous month. |
31
- | Page down | Changes the grid of dates to the next month. |
32
- | Shift + page up | Changes the grid of dates to the same month in the previous year. |
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
- #### Keyboard Navigation
18
-
19
- The callout itself is not focusable but the components within it are.
20
- These keys provide additional functionality to the component.
21
-
22
- | Keys | Functions |
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
- #### Keyboard Navigation
27
-
28
- These keys provide additional functionality to the Interactive Card components.
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
- #### Keyboard Navigation
29
-
30
- These keys provide additional functionality to the component.
31
-
32
- | Keys | Functions |
33
- | ---- | ---- |
34
- | Space | When focused, toggles the check box on and off. |
35
- | Tab | Moves focus to the next focusable component and follows the page tab sequence. |
36
- | Shift + Tab | Moves focus to the previous focusable component. |
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
- #### Keyboard Navigation
25
-
26
- These keys provide additional functionality to the component.
27
-
28
- | Keys | Functions |
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
- #### Keyboard Navigation
21
-
22
- These keys provide additional functionality to the component.
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
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as CollapsiblePanelStories from './CollapsiblePanel.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={CollapsiblePanelStories} isTemplate />
5
7
 
@@ -13,18 +15,13 @@ This component can be used independently and does not require additional compone
13
15
 
14
16
  ### Accessibility
15
17
 
16
- #### Keyboard Navigation
17
-
18
- These keys provide additional functionality to the component.
19
-
20
- | Keys | Functions |
21
- | ---- | --------- |
22
- | Space or Enter | Expands or collapses the content when the trigger is focused. |
23
- | Tab | Focuses the trigger button and the panel content. |
24
- | Shift + Tab | Moves focus to the previous focusable component. |
25
- | Esc | Pressing the escape key closes the panel when it is expanded. |
26
-
27
- #### Screen Readers
28
- This component uses the **`aria-rowcount`** and **`aria-columncount`** attributes to indicate the total number of rows and columns in the grid structure.
18
+ <AccessibilityTable keyboardRows={[
19
+ { key: 'Space or Enter', description: 'Expands or collapses the content when the trigger is focused.' },
20
+ { key: 'Tab', description: 'Focuses the trigger button and the panel content.' },
21
+ KeyboardRows.shiftTabFocusPrevious,
22
+ { key: 'Esc', description: 'Pressing the escape key closes the panel when it is expanded.' },
23
+ ]} screenReaderRows={[
24
+ 'This component uses the **`aria-rowcount`** and **`aria-columncount`** attributes to indicate the total number of rows and columns in the grid structure.',
25
+ ]} />
29
26
 
30
27
 
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as ColorFieldStories from './ColorField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={ColorFieldStories} isTemplate />
5
7
 
@@ -20,21 +22,14 @@ react-aria [OverlayProvider](https://react-spectrum.adobe.com/react-aria/useOver
20
22
 
21
23
  ### Accessibility
22
24
 
23
- #### Keyboard Navigation
24
-
25
- These keys provide additional functionality to the component.
26
-
27
- | Keys | Functions |
28
- | ---- | ---- |
29
- | Tab |Focuses the color swatch and follows the page tab sequence. |
30
- | Shift + Tab | Moves focus to the previous focusable component. |
31
- | Space or Enter | Opens the color swatch when it is focused. Once opened, the focus moves to the input field and is locked inside the ColorPicker Overlay. |
32
- | Esc | When the picker is open, pressing the escape key closes the overlay and focuses on the previously focused component. |
33
- | Up and Down Arrows | Using the up and down arrows on any of the RGBA inputs adjusts the value of the input in focus.
34
-
35
- #### Screen Readers
36
-
37
- This component uses the following attributes to assist screen readers:
38
- - The trigger button uses the **`aria-expanded`** attribute to indicate the expansion and collapse of Sketch Picker.
39
- - When expanded, **`aria-controls`** is added to the button pointing to the Sketch Picker.
40
- - The visibly hidden input uses the **`aria-labelledby`** attribute supplied with label ID.
25
+ <AccessibilityTable keyboardRows={[
26
+ { key: 'Tab', description: 'Focuses the color swatch and follows the page tab sequence.' },
27
+ KeyboardRows.shiftTabFocusPrevious,
28
+ { key: 'Space or Enter', description: 'Opens the color swatch when it is focused. Once opened, the focus moves to the input field and is locked inside the ColorPicker Overlay.' },
29
+ { key: 'Esc', description: 'When the picker is open, pressing the escape key closes the overlay and focuses on the previously focused component.' },
30
+ { key: 'Up and Down Arrows', description: 'Using the up and down arrows on any of the RGBA inputs adjusts the value of the input in focus.' },
31
+ ]} screenReaderRows={[
32
+ 'The trigger button uses the **`aria-expanded`** attribute to indicate the expansion and collapse of Sketch Picker.',
33
+ 'When expanded, **`aria-controls`** is added to the button pointing to the Sketch Picker.',
34
+ 'The visibly hidden input uses the **`aria-labelledby`** attribute supplied with label ID.',
35
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as ComboBoxFieldStories from './ComboBoxField.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={ComboBoxFieldStories} isTemplate />
5
7
 
@@ -27,21 +29,17 @@ exported from Astro and Item originating from [react-stately/collections](https:
27
29
 
28
30
  This component should adhere to the [WAI-ARIA ComboBox](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) accessibility guidelines.
29
31
 
30
- #### Keyboard Navigation
31
-
32
- These keys provide additional functionality to the component.
33
-
34
- | Keys | Functions |
35
- | ---- | ---- |
36
- | Tab | Focuses the field and follows the page tab sequence. |
37
- | Shift + Tab | Moves focus to the previous focusable component. |
38
- | Space or Enter | Selects the component when it is focused. |
39
- | Down arrow | Opens the popover if it isn’t already open. |
40
- | Up and down arrows | Can be used to move through the selection in the popover. |
41
- | Typing in input field | Adds focus to it and opens the popover. |
42
- | Home(Fn + Right Arrow Key) Or Control/Command + Home | Shifts the focus to the first item in the listbox. |
43
- | End(Fn + Left Arrow Key) Or Control/Command + End | Shifts the focus to the last item in the listbox. |
44
- | Esc | Pressing the escape key closes the overlay and adds focus to the previously focused component. |
32
+ <AccessibilityTable keyboardRows={[
33
+ KeyboardRows.tabFocusesField,
34
+ KeyboardRows.shiftTabFocusPrevious,
35
+ KeyboardRows.spaceEnterSelectsComponent,
36
+ { key: 'Down arrow', description: "Opens the popover if it isn’t already open." },
37
+ { key: 'Up and down arrows', description: 'Can be used to move through the selection in the popover.' },
38
+ KeyboardRows.typingOpenPopover,
39
+ KeyboardRows.homeFirstListboxItem,
40
+ KeyboardRows.endLastListboxItem,
41
+ { key: 'Esc', description: 'Pressing the escape key closes the overlay and adds focus to the previously focused component.' }
42
+ ]} />
45
43
 
46
44
  #### Screen Readers
47
45
  This component uses the following attributes to assist screen readers:
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as CopyTextStories from './CopyText.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={CopyTextStories} isTemplate />
5
7
 
@@ -14,11 +16,7 @@ This component requires the [Text](./?path=/docs/components-text--default) compo
14
16
 
15
17
  ### Accessibility
16
18
 
17
- #### Keyboard Navigation
18
-
19
- These keys provide additional functionality to the component.
20
-
21
- | Keys | Functions |
22
- | ---- | --------- |
23
- | Space or Enter | Selects the button. |
24
- | Tab | Focuses the button and follows the page tab sequence.|
19
+ <AccessibilityTable keyboardRows={[
20
+ KeyboardRows.spaceEnterSelectsButton,
21
+ KeyboardRows.tabFocusesButton,
22
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as DataTableStories from './DataTable.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={DataTableStories} isTemplate />
5
7
 
@@ -30,26 +32,19 @@ This component requires these additional React Spectrum components:
30
32
 
31
33
  ### Accessibility
32
34
 
33
- #### Keyboard Navigation
34
-
35
- These keys provide additional functionality to the component.
36
-
37
- | Keys | Functions |
38
- | ---- | --------- |
39
- | Tab | Moves focus to the next focusable component. All focusable components in the table are included in the page tab sequence. |
40
- | Shift + Tab | Moves focus to the previous focusable component. |
41
- | Space or Enter | Focuses the component and triggers an action if one is associated with it. |
42
- | Arrow keys | Can be used to navigate between the components in the table. |
43
- | Focus on a row and scroll down | Shifts the focus to the entire table, not the previously focused row. |
44
- | Home or page up | Shifts the focus to the first row. |
45
- | End or page down | Shifts the focus to the last visible row. |
46
-
47
- #### Screen Readers
48
-
49
- This component uses the following attributes to assist screen readers:
50
- - The **`aria-label`** attribute is used to provide an accessible name.
51
- - The **`aria-rowcount`** and **`aria-columncount`** attributes are used to indicate the total number of rows and columns in the grid structure.
52
- - The DataTableHeader uses the **`aria-rowindex`** attribute and DataTableColumn uses the **`aria-colindex`** attribute to enumerate the header row and columns.
53
- - In the body component, the DataTableRow uses the **`aria-labelledby`** attribute and the grid ID to identify the component and the **`aria-rowindex`** attribute is passed to each row.
54
- - Each DataTableCell uses the **`aria-colindex`** attribute to enumerate the columns within each row.
35
+ <AccessibilityTable keyboardRows={[
36
+ { key: 'Tab', description: 'Moves focus to the next focusable component. All focusable components in the table are included in the page tab sequence.' },
37
+ KeyboardRows.shiftTabFocusPrevious,
38
+ { key: 'Space or Enter', description: 'Focuses the component and triggers an action if one is associated with it.' },
39
+ { key: 'Arrow keys', description: 'Can be used to navigate between the components in the table.' },
40
+ { key: 'Focus on a row and scroll down', description: 'Shifts the focus to the entire table, not the previously focused row.' },
41
+ { key: 'Home or page up', description: 'Shifts the focus to the first row.' },
42
+ { key: 'End or page down', description: 'Shifts the focus to the last visible row.' },
43
+ ]} screenReaderRows={[
44
+ ScreenReaderRows.ariaLabelAccessibleName,
45
+ 'The **`aria-rowcount`** and **`aria-columncount`** attributes are used to indicate the total number of rows and columns in the grid structure.',
46
+ 'The DataTableHeader uses the **`aria-rowindex`** attribute and DataTableColumn uses the **`aria-colindex`** attribute to enumerate the header row and columns.',
47
+ 'In the body component, the DataTableRow uses the **`aria-labelledby`** attribute and the grid ID to identify the component and the **`aria-rowindex`** attribute is passed to each row.',
48
+ 'Each DataTableCell uses the **`aria-colindex`** attribute to enumerate the columns within each row.',
49
+ ]} />
55
50
 
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as DatePickerStories from './DatePicker.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={DatePickerStories} isTemplate />
5
7
 
@@ -21,30 +23,21 @@ This component can be used independently and does not require additional compone
21
23
 
22
24
  This component should adhere to the [WAI-ARIA DatePicker](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/examples/datepicker-dialog/) accessibility guidelines.
23
25
 
24
- #### Keyboard Navigation
25
-
26
- These keys provide additional functionality to the component.
27
-
28
- | Keys | Functions |
29
- | ---- | --------- |
30
- | Space or Enter | Opens the popover when the trigger is focused, selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused. |
31
- | Tab | Focuses the field and follows the page tab sequence. |
32
- | Shift + Tab | Moves focus to the previous focusable component. |
33
- | Pressing Home:(Fn + Right Arrow Key) Or Control or Command + Home | Shifts the focus to the first calendar date. |
34
- | Pressing Home:(Fn + left Arrow Key) Or Control or Command + End | Shifts the focus to the last calendar date. |
35
- | Up and down Arrow keys | When segments are focused, it increments and decrements dates starting from the present day. |
36
- | Left and right arrows | Moves focus between segments. |
37
- | Page up | Changes the grid of dates to the previous month. |
38
- | Page down | Changes the grid of dates to the next month. |
39
- | Shift + page up | Changes the grid of dates to the same month in the previous year. |
40
- | Shift+ page down | Changes the grid of dates to the same month in the next year. |
41
- | Esc | Closes the overlay and shifts focus to the trigger. |
42
-
43
- #### Screen Readers
44
-
45
- This component uses the following attributes to assist screen readers:
46
-
47
- - The hidden input, DateField, and all three spin buttons have an **`aria-labelledby`** attribute pointing to the label ID, along with the **`aria-label`** attribute for an accessible name.
48
- - Each spin button has the **`aria-valuenow`** attribute that defines the current value and it is always used with its text alternative, **`aria-valuetext`**.
49
- The spin buttons also have the **`aria-valuemin`** and **`aria-valuemax`** attributes to specify the minimum and maximum values allowed for a range widget.
50
- - The **`aria-selected`** attribute is added to the grid cell when a date is selected, and **`aria-disabled`** is set to “false” by default.
26
+ <AccessibilityTable keyboardRows={[
27
+ { key: 'Space or Enter', description: 'Opens the popover when the trigger is focused, selects the date when a date is focused, and navigates to the calendar pages when the navigational buttons are focused.' },
28
+ KeyboardRows.tabFocusesField,
29
+ KeyboardRows.shiftTabFocusPrevious,
30
+ KeyboardRows.homeFirstCalendarDate,
31
+ { key: 'Pressing Home:(Fn + left Arrow Key) Or Control or Command + End', description: 'Shifts the focus to the last calendar date.' },
32
+ { key: 'Up and down Arrow keys', description: 'When segments are focused, it increments and decrements dates starting from the present day.' },
33
+ { key: 'Left and right arrows', description: 'Moves focus between segments.' },
34
+ KeyboardRows.pageUpPreviousMonth,
35
+ KeyboardRows.pageDownNextMonth,
36
+ KeyboardRows.shiftPageUpPreviousYear,
37
+ KeyboardRows.shiftPageDownNextYear,
38
+ { key: 'Esc', description: 'Closes the overlay and shifts focus to the trigger.' },
39
+ ]} screenReaderRows={[
40
+ 'The hidden input, DateField, and all three spin buttons have an **`aria-labelledby`** attribute pointing to the label ID, along with the **`aria-label`** attribute for an accessible name.',
41
+ 'Each spin button has the **`aria-valuenow`** attribute that defines the current value and it is always used with its text alternative, **`aria-valuetext`**. The spin buttons also have the **`aria-valuemin`** and **`aria-valuemax`** attributes to specify the minimum and maximum values allowed for a range widget.',
42
+ 'The **`aria-selected`** attribute is added to the grid cell when a date is selected, and **`aria-disabled`** is set to “false” by default.',
43
+ ]} />
@@ -1,5 +1,7 @@
1
1
  import { Meta } from '@storybook/addon-docs/blocks';
2
2
  import * as EnvironmentBreadcrumbStories from './EnvironmentBreadcrumb.stories';
3
+ import AccessibilityTable from '../../utils/docUtils/AccessibilityTable';
4
+ import { KeyboardRows, ScreenReaderRows } from '../../utils/docUtils/accessibilityTableConstants';
3
5
 
4
6
  <Meta of={EnvironmentBreadcrumbStories} isTemplate />
5
7
 
@@ -16,22 +18,15 @@ Item from [react-stately/collections](https://react-spectrum.adobe.com/react-sta
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 breadcrumb item. |
26
- | Tab | Focuses the breadcrumb item and follows the page tab sequence. |
27
- | Shift + Tab | Moves focus to the previous focusable component. |
28
- | Arrow keys | Can be used to navigate between the items in the dropdown list. |
29
- | Esc | Closes the popover when it is expanded. |
30
-
31
- #### Screen readers
32
-
33
- This component uses the following attributes to assist screen readers:
34
- - Each breadcrumb item uses an **`aria-label`** attribute to provide an accessible name.
35
- - The trigger button uses the **`aria-expanded`** attribute to indicate when the content expands and collapses.
36
- - When expanded, **`aria-controls`** is added to the button pointing to the pop-up content.
37
- - The **`aria-haspopup`** attribute describes the type of content presented.
21
+ <AccessibilityTable keyboardRows={[
22
+ { key: 'Space or Enter', description: 'Selects the breadcrumb item.' },
23
+ { key: 'Tab', description: 'Focuses the breadcrumb item and follows the page tab sequence.' },
24
+ KeyboardRows.shiftTabFocusPrevious,
25
+ { key: 'Arrow keys', description: 'Can be used to navigate between the items in the dropdown list.' },
26
+ { key: 'Esc', description: 'Closes the popover when it is expanded.' },
27
+ ]} screenReaderRows={[
28
+ 'Each breadcrumb item uses an **`aria-label`** attribute to provide an accessible name.',
29
+ ScreenReaderRows.triggerAriaExpandedExpandCollapse,
30
+ 'When expanded, **`aria-controls`** is added to the button pointing to the pop-up content.',
31
+ 'The **`aria-haspopup`** attribute describes the type of content presented.',
32
+ ]} />