@patternfly/react-core 5.0.0-alpha.13 → 5.0.0-alpha.14

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 (187) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/components/Accordion/Accordion.d.ts.map +1 -1
  3. package/components/Accordion/Accordion.js +2 -2
  4. package/components/Accordion/Accordion.js.map +1 -1
  5. package/components/Alert/Alert.d.ts +0 -2
  6. package/components/Alert/Alert.d.ts.map +1 -1
  7. package/components/Alert/Alert.js +2 -2
  8. package/components/Alert/Alert.js.map +1 -1
  9. package/components/Menu/Menu.d.ts +0 -2
  10. package/components/Menu/Menu.d.ts.map +1 -1
  11. package/components/Menu/Menu.js +3 -3
  12. package/components/Menu/Menu.js.map +1 -1
  13. package/components/Menu/MenuItem.d.ts +1 -1
  14. package/components/Menu/MenuItem.d.ts.map +1 -1
  15. package/components/Menu/MenuItem.js +3 -3
  16. package/components/Menu/MenuItem.js.map +1 -1
  17. package/components/Menu/MenuList.d.ts +2 -0
  18. package/components/Menu/MenuList.d.ts.map +1 -1
  19. package/components/Menu/MenuList.js +2 -2
  20. package/components/Menu/MenuList.js.map +1 -1
  21. package/components/NumberInput/NumberInput.d.ts +0 -2
  22. package/components/NumberInput/NumberInput.d.ts.map +1 -1
  23. package/components/NumberInput/NumberInput.js +1 -4
  24. package/components/NumberInput/NumberInput.js.map +1 -1
  25. package/components/Page/PageGroup.d.ts +1 -1
  26. package/components/Page/PageGroup.d.ts.map +1 -1
  27. package/components/Page/PageGroup.js +1 -1
  28. package/components/Page/PageGroup.js.map +1 -1
  29. package/components/Page/PageNavigation.d.ts +1 -1
  30. package/components/Page/PageNavigation.d.ts.map +1 -1
  31. package/components/Page/PageNavigation.js +1 -1
  32. package/components/Page/PageNavigation.js.map +1 -1
  33. package/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
  34. package/components/ProgressStepper/ProgressStep.js +3 -1
  35. package/components/ProgressStepper/ProgressStep.js.map +1 -1
  36. package/components/Wizard/Wizard.d.ts +6 -2
  37. package/components/Wizard/Wizard.d.ts.map +1 -1
  38. package/components/Wizard/Wizard.js.map +1 -1
  39. package/components/Wizard/WizardBody.d.ts +6 -2
  40. package/components/Wizard/WizardBody.d.ts.map +1 -1
  41. package/components/Wizard/WizardBody.js +28 -1
  42. package/components/Wizard/WizardBody.js.map +1 -1
  43. package/components/Wizard/WizardToggle.d.ts +6 -2
  44. package/components/Wizard/WizardToggle.d.ts.map +1 -1
  45. package/components/Wizard/WizardToggle.js.map +1 -1
  46. package/dist/esm/components/Accordion/Accordion.d.ts.map +1 -1
  47. package/dist/esm/components/Accordion/Accordion.js +2 -2
  48. package/dist/esm/components/Accordion/Accordion.js.map +1 -1
  49. package/dist/esm/components/Alert/Alert.d.ts +0 -2
  50. package/dist/esm/components/Alert/Alert.d.ts.map +1 -1
  51. package/dist/esm/components/Alert/Alert.js +2 -2
  52. package/dist/esm/components/Alert/Alert.js.map +1 -1
  53. package/dist/esm/components/Menu/Menu.d.ts +0 -2
  54. package/dist/esm/components/Menu/Menu.d.ts.map +1 -1
  55. package/dist/esm/components/Menu/Menu.js +3 -3
  56. package/dist/esm/components/Menu/Menu.js.map +1 -1
  57. package/dist/esm/components/Menu/MenuItem.d.ts +1 -1
  58. package/dist/esm/components/Menu/MenuItem.d.ts.map +1 -1
  59. package/dist/esm/components/Menu/MenuItem.js +3 -3
  60. package/dist/esm/components/Menu/MenuItem.js.map +1 -1
  61. package/dist/esm/components/Menu/MenuList.d.ts +2 -0
  62. package/dist/esm/components/Menu/MenuList.d.ts.map +1 -1
  63. package/dist/esm/components/Menu/MenuList.js +2 -2
  64. package/dist/esm/components/Menu/MenuList.js.map +1 -1
  65. package/dist/esm/components/NumberInput/NumberInput.d.ts +0 -2
  66. package/dist/esm/components/NumberInput/NumberInput.d.ts.map +1 -1
  67. package/dist/esm/components/NumberInput/NumberInput.js +1 -4
  68. package/dist/esm/components/NumberInput/NumberInput.js.map +1 -1
  69. package/dist/esm/components/Page/PageGroup.d.ts +1 -1
  70. package/dist/esm/components/Page/PageGroup.d.ts.map +1 -1
  71. package/dist/esm/components/Page/PageGroup.js +1 -1
  72. package/dist/esm/components/Page/PageGroup.js.map +1 -1
  73. package/dist/esm/components/Page/PageNavigation.d.ts +1 -1
  74. package/dist/esm/components/Page/PageNavigation.d.ts.map +1 -1
  75. package/dist/esm/components/Page/PageNavigation.js +1 -1
  76. package/dist/esm/components/Page/PageNavigation.js.map +1 -1
  77. package/dist/esm/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
  78. package/dist/esm/components/ProgressStepper/ProgressStep.js +3 -1
  79. package/dist/esm/components/ProgressStepper/ProgressStep.js.map +1 -1
  80. package/dist/esm/components/Wizard/Wizard.d.ts +6 -2
  81. package/dist/esm/components/Wizard/Wizard.d.ts.map +1 -1
  82. package/dist/esm/components/Wizard/Wizard.js.map +1 -1
  83. package/dist/esm/components/Wizard/WizardBody.d.ts +6 -2
  84. package/dist/esm/components/Wizard/WizardBody.d.ts.map +1 -1
  85. package/dist/esm/components/Wizard/WizardBody.js +28 -1
  86. package/dist/esm/components/Wizard/WizardBody.js.map +1 -1
  87. package/dist/esm/components/Wizard/WizardToggle.d.ts +6 -2
  88. package/dist/esm/components/Wizard/WizardToggle.d.ts.map +1 -1
  89. package/dist/esm/components/Wizard/WizardToggle.js.map +1 -1
  90. package/dist/esm/next/components/Wizard/WizardBody.d.ts +7 -3
  91. package/dist/esm/next/components/Wizard/WizardBody.d.ts.map +1 -1
  92. package/dist/esm/next/components/Wizard/WizardBody.js +35 -2
  93. package/dist/esm/next/components/Wizard/WizardBody.js.map +1 -1
  94. package/dist/js/components/Accordion/Accordion.d.ts.map +1 -1
  95. package/dist/js/components/Accordion/Accordion.js +2 -2
  96. package/dist/js/components/Accordion/Accordion.js.map +1 -1
  97. package/dist/js/components/Alert/Alert.d.ts +0 -2
  98. package/dist/js/components/Alert/Alert.d.ts.map +1 -1
  99. package/dist/js/components/Alert/Alert.js +2 -2
  100. package/dist/js/components/Alert/Alert.js.map +1 -1
  101. package/dist/js/components/Menu/Menu.d.ts +0 -2
  102. package/dist/js/components/Menu/Menu.d.ts.map +1 -1
  103. package/dist/js/components/Menu/Menu.js +3 -3
  104. package/dist/js/components/Menu/Menu.js.map +1 -1
  105. package/dist/js/components/Menu/MenuItem.d.ts +1 -1
  106. package/dist/js/components/Menu/MenuItem.d.ts.map +1 -1
  107. package/dist/js/components/Menu/MenuItem.js +3 -3
  108. package/dist/js/components/Menu/MenuItem.js.map +1 -1
  109. package/dist/js/components/Menu/MenuList.d.ts +2 -0
  110. package/dist/js/components/Menu/MenuList.d.ts.map +1 -1
  111. package/dist/js/components/Menu/MenuList.js +2 -2
  112. package/dist/js/components/Menu/MenuList.js.map +1 -1
  113. package/dist/js/components/NumberInput/NumberInput.d.ts +0 -2
  114. package/dist/js/components/NumberInput/NumberInput.d.ts.map +1 -1
  115. package/dist/js/components/NumberInput/NumberInput.js +1 -4
  116. package/dist/js/components/NumberInput/NumberInput.js.map +1 -1
  117. package/dist/js/components/Page/PageGroup.d.ts +1 -1
  118. package/dist/js/components/Page/PageGroup.d.ts.map +1 -1
  119. package/dist/js/components/Page/PageGroup.js +1 -1
  120. package/dist/js/components/Page/PageGroup.js.map +1 -1
  121. package/dist/js/components/Page/PageNavigation.d.ts +1 -1
  122. package/dist/js/components/Page/PageNavigation.d.ts.map +1 -1
  123. package/dist/js/components/Page/PageNavigation.js +1 -1
  124. package/dist/js/components/Page/PageNavigation.js.map +1 -1
  125. package/dist/js/components/ProgressStepper/ProgressStep.d.ts.map +1 -1
  126. package/dist/js/components/ProgressStepper/ProgressStep.js +3 -1
  127. package/dist/js/components/ProgressStepper/ProgressStep.js.map +1 -1
  128. package/dist/js/components/Wizard/Wizard.d.ts +6 -2
  129. package/dist/js/components/Wizard/Wizard.d.ts.map +1 -1
  130. package/dist/js/components/Wizard/Wizard.js.map +1 -1
  131. package/dist/js/components/Wizard/WizardBody.d.ts +6 -2
  132. package/dist/js/components/Wizard/WizardBody.d.ts.map +1 -1
  133. package/dist/js/components/Wizard/WizardBody.js +28 -1
  134. package/dist/js/components/Wizard/WizardBody.js.map +1 -1
  135. package/dist/js/components/Wizard/WizardToggle.d.ts +6 -2
  136. package/dist/js/components/Wizard/WizardToggle.d.ts.map +1 -1
  137. package/dist/js/components/Wizard/WizardToggle.js.map +1 -1
  138. package/dist/js/next/components/Wizard/WizardBody.d.ts +7 -3
  139. package/dist/js/next/components/Wizard/WizardBody.d.ts.map +1 -1
  140. package/dist/js/next/components/Wizard/WizardBody.js +35 -2
  141. package/dist/js/next/components/Wizard/WizardBody.js.map +1 -1
  142. package/dist/umd/react-core.min.js +1 -1
  143. package/next/components/Wizard/WizardBody.d.ts +7 -3
  144. package/next/components/Wizard/WizardBody.d.ts.map +1 -1
  145. package/next/components/Wizard/WizardBody.js +35 -2
  146. package/next/components/Wizard/WizardBody.js.map +1 -1
  147. package/package.json +2 -2
  148. package/src/components/Accordion/Accordion.tsx +2 -1
  149. package/src/components/Alert/Alert.tsx +0 -4
  150. package/src/components/Alert/__tests__/Alert.test.tsx +33 -25
  151. package/src/components/Menu/Menu.tsx +0 -4
  152. package/src/components/Menu/MenuItem.tsx +4 -2
  153. package/src/components/Menu/MenuList.tsx +4 -0
  154. package/src/components/NumberInput/NumberInput.tsx +0 -6
  155. package/src/components/NumberInput/__tests__/NumberInput.test.tsx +0 -6
  156. package/src/components/NumberInput/examples/NumberInputCustomStep.tsx +0 -1
  157. package/src/components/NumberInput/examples/NumberInputCustomStepAndThreshold.tsx +0 -1
  158. package/src/components/NumberInput/examples/NumberInputDefault.tsx +0 -1
  159. package/src/components/NumberInput/examples/NumberInputDisabled.tsx +0 -1
  160. package/src/components/NumberInput/examples/NumberInputUnit.tsx +0 -2
  161. package/src/components/NumberInput/examples/NumberInputUnitThreshold.tsx +0 -1
  162. package/src/components/NumberInput/examples/NumberInputVaryingSizes.tsx +0 -4
  163. package/src/components/NumberInput/examples/NumberInputWithStatus.tsx +0 -1
  164. package/src/components/Page/PageGroup.tsx +2 -3
  165. package/src/components/Page/PageNavigation.tsx +2 -3
  166. package/src/components/Page/__tests__/Page.test.tsx +6 -1
  167. package/src/components/Page/__tests__/PageGroup.test.tsx +5 -1
  168. package/src/components/Page/__tests__/PageNavigation.test.tsx +5 -1
  169. package/src/components/Page/__tests__/__snapshots__/Page.test.tsx.snap +3 -1
  170. package/src/components/Page/__tests__/__snapshots__/PageGroup.test.tsx.snap +1 -0
  171. package/src/components/Page/__tests__/__snapshots__/PageNavigation.test.tsx.snap +1 -0
  172. package/src/components/ProgressStepper/ProgressStep.tsx +3 -1
  173. package/src/components/ProgressStepper/__tests__/ProgressStep.test.tsx +2 -2
  174. package/src/components/Wizard/Wizard.tsx +6 -2
  175. package/src/components/Wizard/WizardBody.tsx +46 -3
  176. package/src/components/Wizard/WizardToggle.tsx +6 -2
  177. package/src/components/Wizard/__tests__/Generated/__snapshots__/WizardBody.test.tsx.snap +0 -2
  178. package/src/components/Wizard/__tests__/Generated/__snapshots__/WizardToggle.test.tsx.snap +0 -2
  179. package/src/components/Wizard/__tests__/Wizard.test.tsx +70 -132
  180. package/src/components/Wizard/__tests__/__snapshots__/Wizard.test.tsx.snap +0 -2
  181. package/src/components/Wizard/examples/WizardBasic.tsx +26 -1
  182. package/src/demos/examples/AlertGroup/AlertGroupToastWithNotificationDrawer.tsx +0 -1
  183. package/src/next/components/Wizard/WizardBody.tsx +57 -8
  184. package/src/next/components/Wizard/__tests__/WizardBody.test.tsx +0 -10
  185. package/src/next/components/Wizard/examples/Wizard.md +1 -1
  186. package/src/next/components/Wizard/examples/WizardBasic.tsx +19 -1
  187. package/src/next/components/Wizard/examples/WizardKitchenSink.tsx +0 -236
@@ -6,15 +6,19 @@ export interface WizardBodyProps {
6
6
  children: React.ReactNode | React.ReactNode[];
7
7
  /** Set to true to remove the default body padding */
8
8
  hasNoPadding?: boolean;
9
- /** An aria-label to use for the wrapper element */
9
+ /** Adds an accessible name to the wrapper element when the content overflows and renders
10
+ * a scrollbar.
11
+ */
10
12
  'aria-label'?: string;
11
- /** Sets the aria-labelledby attribute for the wrapper element */
13
+ /** Adds an accessible name to the wrapper element by passing the the id of one or more elements.
14
+ * The aria-labelledby will only be applied when the content overflows and renders a scrollbar.
15
+ */
12
16
  'aria-labelledby'?: string;
13
17
  /** Component used as the wrapping content container */
14
18
  component?: React.ElementType;
15
19
  }
16
20
  export declare const WizardBody: {
17
- ({ children, hasNoPadding, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, component: WrapperComponent }: WizardBodyProps): JSX.Element;
21
+ ({ children, hasNoPadding, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, component }: WizardBodyProps): JSX.Element;
18
22
  displayName: string;
19
23
  };
20
24
  //# sourceMappingURL=WizardBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"WizardBody.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC9C,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU;0HAMpB,eAAe;;CAIjB,CAAC"}
1
+ {"version":3,"file":"WizardBody.d.ts","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;IAC9C,qDAAqD;IACrD,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,uDAAuD;IACvD,SAAS,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;CAC/B;AAED,eAAO,MAAM,UAAU;wGAMpB,eAAe;;CA8CjB,CAAC"}
@@ -1,7 +1,40 @@
1
1
  import React from 'react';
2
2
  import styles from '@patternfly/react-styles/css/components/Wizard/wizard';
3
3
  import { css } from '@patternfly/react-styles';
4
- export const WizardBody = ({ children, hasNoPadding = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, component: WrapperComponent = 'div' }) => (React.createElement(WrapperComponent, { "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, className: css(styles.wizardMain) },
5
- React.createElement("div", { className: css(styles.wizardMainBody, hasNoPadding && styles.modifiers.noPadding) }, children)));
4
+ import { WizardContext } from './WizardContext';
5
+ import { debounce } from '../../../helpers/util';
6
+ import { getResizeObserver } from '../../../helpers/resizeObserver';
7
+ export const WizardBody = ({ children, hasNoPadding = false, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, component = 'div' }) => {
8
+ const [hasScrollbar, setHasScrollbar] = React.useState(false);
9
+ const [previousWidth, setPreviousWidth] = React.useState(undefined);
10
+ const wrapperRef = React.useRef(null);
11
+ const WrapperComponent = component;
12
+ const { activeStep } = React.useContext(WizardContext);
13
+ const defaultAriaLabel = ariaLabel || `${activeStep === null || activeStep === void 0 ? void 0 : activeStep.name} content`;
14
+ React.useEffect(() => {
15
+ const resize = () => {
16
+ if (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) {
17
+ const { offsetWidth, offsetHeight, scrollHeight } = wrapperRef.current;
18
+ if (previousWidth !== offsetWidth) {
19
+ setPreviousWidth(offsetWidth);
20
+ setHasScrollbar(offsetHeight < scrollHeight);
21
+ }
22
+ }
23
+ };
24
+ const handleResizeWithDelay = debounce(resize, 250);
25
+ let observer = () => { };
26
+ if (wrapperRef === null || wrapperRef === void 0 ? void 0 : wrapperRef.current) {
27
+ observer = getResizeObserver(wrapperRef.current, handleResizeWithDelay);
28
+ const { offsetHeight, scrollHeight } = wrapperRef.current;
29
+ setHasScrollbar(offsetHeight < scrollHeight);
30
+ setPreviousWidth(wrapperRef.current.offsetWidth);
31
+ }
32
+ return () => {
33
+ observer();
34
+ };
35
+ }, []);
36
+ return (React.createElement(WrapperComponent, Object.assign({ ref: wrapperRef }, (component === 'div' && hasScrollbar && { role: 'region' }), (hasScrollbar && { 'aria-label': defaultAriaLabel, 'aria-labelledby': ariaLabelledBy, tabIndex: 0 }), { className: css(styles.wizardMain) }),
37
+ React.createElement("div", { className: css(styles.wizardMainBody, hasNoPadding && styles.modifiers.noPadding) }, children)));
38
+ };
6
39
  WizardBody.displayName = 'WizardBody';
7
40
  //# sourceMappingURL=WizardBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"WizardBody.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,uDAAuD,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAkB/C,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,EAAE,gBAAgB,GAAG,KAAK,EACnB,EAAE,EAAE,CAAC,CACrB,oBAAC,gBAAgB,kBAAa,SAAS,qBAAmB,cAAc,EAAE,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC;IACzG,6BAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAG,QAAQ,CAAO,CACvF,CACpB,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
1
+ {"version":3,"file":"WizardBody.js","sourceRoot":"","sources":["../../../../../src/next/components/Wizard/WizardBody.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,uDAAuD,CAAC;AAC3E,OAAO,EAAE,GAAG,EAAE,MAAM,0BAA0B,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAsBpE,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EACzB,QAAQ,EACR,YAAY,GAAG,KAAK,EACpB,YAAY,EAAE,SAAS,EACvB,iBAAiB,EAAE,cAAc,EACjC,SAAS,GAAG,KAAK,EACD,EAAE,EAAE;IACpB,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC9D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAqB,SAAS,CAAC,CAAC;IACxF,MAAM,UAAU,GAAG,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,gBAAgB,GAAG,SAAS,CAAC;IACnC,MAAM,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACvD,MAAM,gBAAgB,GAAG,SAAS,IAAI,GAAG,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,UAAU,CAAC;IAEpE,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,MAAM,MAAM,GAAG,GAAG,EAAE;YAClB,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,EAAE;gBACvB,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC;gBAEvE,IAAI,aAAa,KAAK,WAAW,EAAE;oBACjC,gBAAgB,CAAC,WAAW,CAAC,CAAC;oBAC9B,eAAe,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC;iBAC9C;aACF;QACH,CAAC,CAAC;QAEF,MAAM,qBAAqB,GAAG,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QACpD,IAAI,QAAQ,GAAG,GAAG,EAAE,GAAE,CAAC,CAAC;QAExB,IAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,EAAE;YACvB,QAAQ,GAAG,iBAAiB,CAAC,UAAU,CAAC,OAAO,EAAE,qBAAqB,CAAC,CAAC;YACxE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,UAAU,CAAC,OAAO,CAAC;YAE1D,eAAe,CAAC,YAAY,GAAG,YAAY,CAAC,CAAC;YAC7C,gBAAgB,CAAE,UAAU,CAAC,OAAuB,CAAC,WAAW,CAAC,CAAC;SACnE;QAED,OAAO,GAAG,EAAE;YACV,QAAQ,EAAE,CAAC;QACb,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,oBAAC,gBAAgB,kBACf,GAAG,EAAE,UAAU,IACX,CAAC,SAAS,KAAK,KAAK,IAAI,YAAY,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,EAC3D,CAAC,YAAY,IAAI,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC,IACxG,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC;QAEjC,6BAAK,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,cAAc,EAAE,YAAY,IAAI,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,IAAG,QAAQ,CAAO,CACvF,CACpB,CAAC;AACJ,CAAC,CAAC;AAEF,UAAU,CAAC,WAAW,GAAG,YAAY,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@patternfly/react-core",
3
- "version": "5.0.0-alpha.13",
3
+ "version": "5.0.0-alpha.14",
4
4
  "description": "This library provides a set of common React components for use with the PatternFly reference implementation.",
5
5
  "main": "dist/js/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -70,5 +70,5 @@
70
70
  "react": "^16.8 || ^17 || ^18",
71
71
  "react-dom": "^16.8 || ^17 || ^18"
72
72
  },
73
- "gitHead": "c6de8133269e210cf9c816542304cbc9dc0e4e77"
73
+ "gitHead": "15626ee299af769871fd0852efd69373fa1e49b5"
74
74
  }
@@ -23,7 +23,7 @@ export interface AccordionProps extends React.HTMLProps<HTMLDListElement> {
23
23
  export const Accordion: React.FunctionComponent<AccordionProps> = ({
24
24
  children = null,
25
25
  className = '',
26
- 'aria-label': ariaLabel = '',
26
+ 'aria-label': ariaLabel,
27
27
  headingLevel = 'h3',
28
28
  asDefinitionList = true,
29
29
  isBordered = false,
@@ -40,6 +40,7 @@ export const Accordion: React.FunctionComponent<AccordionProps> = ({
40
40
  className
41
41
  )}
42
42
  aria-label={ariaLabel}
43
+ {...(!asDefinitionList && ariaLabel && { role: 'region' })}
43
44
  {...props}
44
45
  >
45
46
  <AccordionContext.Provider
@@ -27,8 +27,6 @@ export interface AlertProps extends Omit<React.HTMLProps<HTMLDivElement>, 'actio
27
27
  * or React.Fragment.
28
28
  */
29
29
  actionLinks?: React.ReactNode;
30
- /** Adds accessible text to the alert. */
31
- 'aria-label'?: string;
32
30
  /** Content rendered inside the alert. */
33
31
  children?: React.ReactNode;
34
32
  /** Additional classes to add to the alert. */
@@ -97,7 +95,6 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
97
95
  isPlain = false,
98
96
  isLiveRegion = false,
99
97
  variantLabel = `${capitalize(variant)} alert:`,
100
- 'aria-label': ariaLabel = `${capitalize(variant)} Alert`,
101
98
  actionClose,
102
99
  actionLinks,
103
100
  title,
@@ -229,7 +226,6 @@ export const Alert: React.FunctionComponent<AlertProps> = ({
229
226
  styles.modifiers[variant as 'success' | 'danger' | 'warning' | 'info'],
230
227
  className
231
228
  )}
232
- aria-label={ariaLabel}
233
229
  {...ouiaProps}
234
230
  {...(isLiveRegion && {
235
231
  'aria-live': 'polite',
@@ -48,13 +48,9 @@ test('Renders with class pf-c-alert__title on the div containing the title', ()
48
48
  expect(screen.getByRole('heading', { name: 'Default alert: Some title' })).toHaveClass('pf-c-alert__title');
49
49
  });
50
50
 
51
- test('Renders with a default aria label of Default Alert', () => {
52
- render(
53
- <Alert title="Some title" data-testid="Alert-test-id">
54
- Some alert
55
- </Alert>
56
- );
57
- expect(screen.getByTestId('Alert-test-id')).toHaveAccessibleName('Default Alert');
51
+ test('Renders with default hidden text of "Default alert:"', () => {
52
+ render(<Alert title="Some title">Some alert</Alert>);
53
+ expect(screen.getByText('Default alert:')).toBeInTheDocument();
58
54
  });
59
55
 
60
56
  ['success', 'danger', 'warning', 'info'].forEach(variant => {
@@ -76,13 +72,13 @@ test('Renders with a default aria label of Default Alert', () => {
76
72
  expect(screen.getByTestId('Alert-test-id')).toHaveClass(`pf-m-${variant}`);
77
73
  });
78
74
 
79
- test(`Renders with aria label ${capitalize(variant)} Alert when variant = ${variant}`, () => {
75
+ test(`Renders with hidden text "${capitalize(variant)} alert:" when variant = ${variant}`, () => {
80
76
  render(
81
77
  <Alert variant={`${variant as AlertVariant}`} title="Some title" data-testid="Alert-test-id">
82
78
  Some alert
83
79
  </Alert>
84
80
  );
85
- expect(screen.getByTestId('Alert-test-id')).toHaveAccessibleName(`${capitalize(variant)} Alert`);
81
+ expect(screen.getByText(`${capitalize(variant)} alert:`)).toBeInTheDocument();
86
82
  });
87
83
 
88
84
  test(`Renders the title with an accessible name of '${capitalize(
@@ -136,31 +132,39 @@ test('Renders with a default aria label of Default Alert', () => {
136
132
  });
137
133
 
138
134
  test('Does not render with class pf-m-inline by default', () => {
139
- render(<Alert title="Some title">Some alert</Alert>);
140
- expect(screen.getByLabelText('Default Alert')).not.toHaveClass('pf-m-inline');
135
+ render(
136
+ <Alert title="Some title" data-testid="Alert-test-id">
137
+ Some alert
138
+ </Alert>
139
+ );
140
+ expect(screen.getByTestId('Alert-test-id')).not.toHaveClass('pf-m-inline');
141
141
  });
142
142
 
143
143
  test('Renders with class pf-m-inline when isInline = true', () => {
144
144
  render(
145
- <Alert isInline title="Some title">
145
+ <Alert isInline title="Some title" data-testid="Alert-test-id">
146
146
  Some alert
147
147
  </Alert>
148
148
  );
149
- expect(screen.getByLabelText('Default Alert')).toHaveClass('pf-m-inline');
149
+ expect(screen.getByTestId('Alert-test-id')).toHaveClass('pf-m-inline');
150
150
  });
151
151
 
152
152
  test('Does not render with class pf-m-plain by default', () => {
153
- render(<Alert title="Some title">Some alert</Alert>);
154
- expect(screen.getByLabelText('Default Alert')).not.toHaveClass('pf-m-plain');
153
+ render(
154
+ <Alert title="Some title" data-testid="Alert-test-id">
155
+ Some alert
156
+ </Alert>
157
+ );
158
+ expect(screen.getByTestId('Alert-test-id')).not.toHaveClass('pf-m-plain');
155
159
  });
156
160
 
157
161
  test('Renders with class pf-m-plain when isPlain = true', () => {
158
162
  render(
159
- <Alert isPlain title="Some title">
163
+ <Alert isPlain title="Some title" data-testid="Alert-test-id">
160
164
  Some alert
161
165
  </Alert>
162
166
  );
163
- expect(screen.getByLabelText('Default Alert')).toHaveClass('pf-m-plain');
167
+ expect(screen.getByTestId('Alert-test-id')).toHaveClass('pf-m-plain');
164
168
  });
165
169
 
166
170
  test('Renders the title', () => {
@@ -588,17 +592,21 @@ test('Passes customIcon value to AlertIcon', () => {
588
592
  });
589
593
 
590
594
  test('Does not render with class pf-m-expandable by default', () => {
591
- render(<Alert title="Some title">Some alert</Alert>);
592
- expect(screen.getByLabelText('Default Alert')).not.toHaveClass('pf-m-expandable');
595
+ render(
596
+ <Alert title="Some title" data-testid="Alert-test-id">
597
+ Some alert
598
+ </Alert>
599
+ );
600
+ expect(screen.getByTestId('Alert-test-id')).not.toHaveClass('pf-m-expandable');
593
601
  });
594
602
 
595
603
  test('Renders with class pf-m-expandable when isExpandable = true', () => {
596
604
  render(
597
- <Alert isExpandable title="Some title">
605
+ <Alert isExpandable title="Some title" data-testid="Alert-test-id">
598
606
  Some alert
599
607
  </Alert>
600
608
  );
601
- expect(screen.getByLabelText('Default Alert')).toHaveClass('pf-m-expandable');
609
+ expect(screen.getByTestId('Alert-test-id')).toHaveClass('pf-m-expandable');
602
610
  });
603
611
 
604
612
  test('Renders AlertToggleExpandButton inside pf-c-alert__toggle', () => {
@@ -613,26 +621,26 @@ test('Renders AlertToggleExpandButton inside pf-c-alert__toggle', () => {
613
621
 
614
622
  test('Does not render with class pf-m-expanded when AlertToggleExpandButton has not been clicked', () => {
615
623
  render(
616
- <Alert isExpandable title="Some title">
624
+ <Alert isExpandable title="Some title" data-testid="Alert-test-id">
617
625
  Some alert
618
626
  </Alert>
619
627
  );
620
628
 
621
- expect(screen.getByLabelText('Default Alert')).not.toHaveClass('pf-m-expanded');
629
+ expect(screen.getByTestId('Alert-test-id')).not.toHaveClass('pf-m-expanded');
622
630
  });
623
631
 
624
632
  test('Renders with class pf-m-expanded once the AlertToggleExpandButton is clicked', async () => {
625
633
  const user = userEvent.setup();
626
634
 
627
635
  render(
628
- <Alert isExpandable title="Some title">
636
+ <Alert isExpandable title="Some title" data-testid="Alert-test-id">
629
637
  Some alert
630
638
  </Alert>
631
639
  );
632
640
 
633
641
  await user.click(screen.getByRole('button'));
634
642
 
635
- expect(screen.getByLabelText('Default Alert')).toHaveClass('pf-m-expanded');
643
+ expect(screen.getByTestId('Alert-test-id')).toHaveClass('pf-m-expanded');
636
644
  });
637
645
 
638
646
  test('Does not render children when isExpandable = true and AlertToggleExpandButton has not been clicked', () => {
@@ -25,8 +25,6 @@ export interface MenuProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'r
25
25
  event: React.FormEvent<HTMLInputElement> | React.SyntheticEvent<HTMLButtonElement>,
26
26
  value: string
27
27
  ) => void;
28
- /** Accessibility label */
29
- 'aria-label'?: string;
30
28
  /** @beta Indicates if menu contains a flyout menu */
31
29
  containsFlyout?: boolean;
32
30
  /** @beta Indicating that the menu should have nav flyout styling */
@@ -250,7 +248,6 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
250
248
 
251
249
  render() {
252
250
  const {
253
- 'aria-label': ariaLabel,
254
251
  id,
255
252
  children,
256
253
  className,
@@ -339,7 +336,6 @@ class MenuBase extends React.Component<MenuProps, MenuState> {
339
336
  _isMenuDrilledIn && styles.modifiers.drilledIn,
340
337
  className
341
338
  )}
342
- aria-label={ariaLabel}
343
339
  ref={this.menuRef}
344
340
  {...getOUIAProps(Menu.displayName, ouiaId !== undefined ? ouiaId : this.state.ouiaStateId, ouiaSafe)}
345
341
  {...props}
@@ -64,7 +64,7 @@ export interface MenuItemProps extends Omit<React.HTMLProps<HTMLLIElement>, 'onC
64
64
  direction?: 'down' | 'up';
65
65
  /** @beta True if item is on current selection path */
66
66
  isOnPath?: boolean;
67
- /** Accessibility label */
67
+ /** Adds an accessible name to the menu item. */
68
68
  'aria-label'?: string;
69
69
  /** @hide Forwarded ref */
70
70
  innerRef?: React.Ref<HTMLAnchorElement | HTMLButtonElement>;
@@ -103,6 +103,7 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
103
103
  isOnPath,
104
104
  innerRef,
105
105
  id,
106
+ 'aria-label': ariaLabel,
106
107
  ...props
107
108
  }: MenuItemProps) => {
108
109
  const {
@@ -312,6 +313,7 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
312
313
  {...(flyoutMenu && { onKeyDown: handleFlyout })}
313
314
  ref={ref}
314
315
  role={!hasCheckbox ? 'none' : 'menuitem'}
316
+ {...(hasCheckbox && { 'aria-label': ariaLabel })}
315
317
  {...props}
316
318
  >
317
319
  <GenerateId>
@@ -321,7 +323,7 @@ const MenuItemBase: React.FunctionComponent<MenuItemProps> = ({
321
323
  tabIndex={-1}
322
324
  className={css(styles.menuItem, getIsSelected() && !hasCheckbox && styles.modifiers.selected, className)}
323
325
  aria-current={getAriaCurrent()}
324
- {...(!hasCheckbox && { disabled: isDisabled })}
326
+ {...(!hasCheckbox && { disabled: isDisabled, 'aria-label': ariaLabel })}
325
327
  {...(!hasCheckbox && !flyoutMenu && { role: isSelectMenu ? 'option' : 'menuitem' })}
326
328
  {...(!hasCheckbox && !flyoutMenu && isSelectMenu && { 'aria-selected': getIsSelected() })}
327
329
  ref={innerRef}
@@ -12,12 +12,15 @@ export interface MenuListProps extends React.HTMLProps<HTMLUListElement> {
12
12
  * for a non-checkbox menu. Only applies when the menu's role is "listbox".
13
13
  */
14
14
  isAriaMultiselectable?: boolean;
15
+ /** Adds an accessible name to the menu. */
16
+ 'aria-label'?: string;
15
17
  }
16
18
 
17
19
  export const MenuList: React.FunctionComponent<MenuListProps> = ({
18
20
  children = null,
19
21
  className,
20
22
  isAriaMultiselectable = false,
23
+ 'aria-label': ariaLabel,
21
24
  ...props
22
25
  }: MenuListProps) => {
23
26
  const { role } = React.useContext(MenuContext);
@@ -27,6 +30,7 @@ export const MenuList: React.FunctionComponent<MenuListProps> = ({
27
30
  role={role}
28
31
  {...(role === 'listbox' && { 'aria-multiselectable': isAriaMultiselectable })}
29
32
  className={css(styles.menuList, className)}
33
+ aria-label={ariaLabel}
30
34
  {...props}
31
35
  >
32
36
  {children}
@@ -51,8 +51,6 @@ export interface NumberInputProps extends React.HTMLProps<HTMLDivElement> {
51
51
  minusBtnProps?: ButtonProps;
52
52
  /** Additional properties added to the plus button */
53
53
  plusBtnProps?: ButtonProps;
54
- /** Allow the user to clear out the input to an empty string (recommended) */
55
- allowEmptyInput?: boolean;
56
54
  }
57
55
 
58
56
  type DefaultKeyDownHandlerArgs = Pick<NumberInputProps, 'inputName' | 'onMinus' | 'onPlus'>;
@@ -89,12 +87,8 @@ export const NumberInput: React.FunctionComponent<NumberInputProps> = ({
89
87
  inputProps,
90
88
  minusBtnProps,
91
89
  plusBtnProps,
92
- allowEmptyInput = false,
93
90
  ...props
94
91
  }: NumberInputProps) => {
95
- if (!allowEmptyInput) {
96
- value = value || 0;
97
- }
98
92
  const numberInputUnit = <div className={css(styles.numberInputUnit)}>{unit}</div>;
99
93
  const keyDownHandler =
100
94
  inputProps && inputProps.onKeyDown ? inputProps.onKeyDown : defaultKeyDownHandler({ inputName, onMinus, onPlus });
@@ -210,12 +210,6 @@ describe('numberInput', () => {
210
210
  test('renders 0 if null value passed', () => {
211
211
  render(<NumberInput value={null} />);
212
212
  const input = screen.getByRole('spinbutton');
213
- expect(input).toHaveDisplayValue('0');
214
- });
215
-
216
- test('renders nothing if null value passed with allow empty', () => {
217
- render(<NumberInput allowEmptyInput value={null} />);
218
- const input = screen.getByRole('spinbutton');
219
213
  expect(input).toHaveDisplayValue('');
220
214
  });
221
215
 
@@ -24,7 +24,6 @@ export const NumberInputCustomStep: React.FunctionComponent = () => {
24
24
  inputAriaLabel="number input"
25
25
  minusBtnAriaLabel="minus"
26
26
  plusBtnAriaLabel="plus"
27
- allowEmptyInput
28
27
  />
29
28
  );
30
29
  };
@@ -46,7 +46,6 @@ export const NumberInputCustomStepAndThreshold: React.FunctionComponent = () =>
46
46
  inputAriaLabel="number input"
47
47
  minusBtnAriaLabel="minus"
48
48
  plusBtnAriaLabel="plus"
49
- allowEmptyInput
50
49
  />
51
50
  );
52
51
  };
@@ -29,7 +29,6 @@ export const NumberInputDefault: React.FunctionComponent = () => {
29
29
  inputAriaLabel="number input"
30
30
  minusBtnAriaLabel="minus"
31
31
  plusBtnAriaLabel="plus"
32
- allowEmptyInput
33
32
  />
34
33
  );
35
34
  };
@@ -35,7 +35,6 @@ export const NumberInputDisabled: React.FunctionComponent = () => {
35
35
  plusBtnAriaLabel="plus"
36
36
  unit="%"
37
37
  isDisabled
38
- allowEmptyInput
39
38
  />
40
39
  );
41
40
  };
@@ -37,7 +37,6 @@ export const NumberInputUnit: React.FunctionComponent = () => {
37
37
  minusBtnAriaLabel="minus 1"
38
38
  plusBtnAriaLabel="plus 1"
39
39
  unit="%"
40
- allowEmptyInput
41
40
  />
42
41
  <br />
43
42
  <br />
@@ -52,7 +51,6 @@ export const NumberInputUnit: React.FunctionComponent = () => {
52
51
  plusBtnAriaLabel="plus 0.01"
53
52
  unit="$"
54
53
  unitPosition="before"
55
- allowEmptyInput
56
54
  />
57
55
  </React.Fragment>
58
56
  );
@@ -59,7 +59,6 @@ export const NumberInputUnitThreshold: React.FunctionComponent = () => {
59
59
  minusBtnAriaLabel="minus"
60
60
  plusBtnAriaLabel="plus"
61
61
  unit="%"
62
- allowEmptyInput
63
62
  />
64
63
  </React.Fragment>
65
64
  );
@@ -35,7 +35,6 @@ export const NumberInputVaryingSizes: React.FunctionComponent = () => {
35
35
  minusBtnAriaLabel="input 2 minus"
36
36
  plusBtnAriaLabel="input 2 plus"
37
37
  widthChars={1}
38
- allowEmptyInput
39
38
  />
40
39
  <br />
41
40
  <br />
@@ -49,7 +48,6 @@ export const NumberInputVaryingSizes: React.FunctionComponent = () => {
49
48
  minusBtnAriaLabel="input 2 minus"
50
49
  plusBtnAriaLabel="input 2 plus"
51
50
  widthChars={10}
52
- allowEmptyInput
53
51
  />
54
52
  <br />
55
53
  <br />
@@ -63,7 +61,6 @@ export const NumberInputVaryingSizes: React.FunctionComponent = () => {
63
61
  minusBtnAriaLabel="input 3 minus"
64
62
  plusBtnAriaLabel="input 3 plus"
65
63
  widthChars={5}
66
- allowEmptyInput
67
64
  />
68
65
  <br />
69
66
  <br />
@@ -77,7 +74,6 @@ export const NumberInputVaryingSizes: React.FunctionComponent = () => {
77
74
  minusBtnAriaLabel="input 4 minus"
78
75
  plusBtnAriaLabel="input 4 plus"
79
76
  widthChars={5}
80
- allowEmptyInput
81
77
  />
82
78
  </React.Fragment>
83
79
  );
@@ -53,7 +53,6 @@ export const NumberInputWithStatus: React.FunctionComponent = () => {
53
53
  inputAriaLabel="number input"
54
54
  minusBtnAriaLabel="minus"
55
55
  plusBtnAriaLabel="plus"
56
- allowEmptyInput
57
56
  />
58
57
  </>
59
58
  );
@@ -23,7 +23,7 @@ export interface PageGroupProps extends React.HTMLProps<HTMLDivElement> {
23
23
  hasShadowBottom?: boolean;
24
24
  /** Flag indicating if the PageGroup has a scrolling overflow */
25
25
  hasOverflowScroll?: boolean;
26
- /** Adds an accessible name to the page group. Required when the hasOverflowScroll prop is set to true. */
26
+ /** Adds an accessible name to the page group when the hasOverflowScroll prop is set to true. */
27
27
  'aria-label'?: string;
28
28
  }
29
29
 
@@ -57,8 +57,7 @@ export const PageGroup = ({
57
57
  hasOverflowScroll && styles.modifiers.overflowScroll,
58
58
  className
59
59
  )}
60
- {...(hasOverflowScroll && { tabIndex: 0 })}
61
- aria-label={ariaLabel}
60
+ {...(hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel })}
62
61
  >
63
62
  {children}
64
63
  </div>
@@ -26,7 +26,7 @@ export interface PageNavigationProps extends React.HTMLProps<HTMLDivElement> {
26
26
  hasShadowBottom?: boolean;
27
27
  /** Flag indicating if the PageNavigation has a scrolling overflow */
28
28
  hasOverflowScroll?: boolean;
29
- /** Adds an accessible name to the page navigation. Required when the hasOverflowScroll prop is set to true. */
29
+ /** Adds an accessible name to the page navigation when the hasOverflowScroll prop is set to true. */
30
30
  'aria-label'?: string;
31
31
  }
32
32
 
@@ -61,8 +61,7 @@ export const PageNavigation = ({
61
61
  hasOverflowScroll && styles.modifiers.overflowScroll,
62
62
  className
63
63
  )}
64
- {...(hasOverflowScroll && { tabIndex: 0 })}
65
- aria-label={ariaLabel}
64
+ {...(hasOverflowScroll && { tabIndex: 0, role: 'region', 'aria-label': ariaLabel })}
66
65
  {...props}
67
66
  >
68
67
  {isWidthLimited && <div className={css(styles.pageMainBody)}>{children}</div>}
@@ -356,7 +356,12 @@ describe('Page', () => {
356
356
  tertiaryNav={nav}
357
357
  isBreadcrumbGrouped
358
358
  isTertiaryNavGrouped
359
- groupProps={{ stickyOnBreakpoint: { default: 'bottom' }, hasShadowTop: true, 'aria-label': 'test' }}
359
+ groupProps={{
360
+ stickyOnBreakpoint: { default: 'bottom' },
361
+ hasShadowTop: true,
362
+ hasOverflowScroll: true,
363
+ 'aria-label': 'test'
364
+ }}
360
365
  >
361
366
  <PageSection variant="default">Section with default background</PageSection>
362
367
  <PageSection variant="light">Section with light background</PageSection>
@@ -35,7 +35,11 @@ describe('page group', () => {
35
35
  });
36
36
 
37
37
  test('Renders with the passed aria-label applied', () => {
38
- render(<PageGroup aria-label="Test label">test</PageGroup>);
38
+ render(
39
+ <PageGroup aria-label="Test label" hasOverflowScroll>
40
+ test
41
+ </PageGroup>
42
+ );
39
43
 
40
44
  expect(screen.getByText('test')).toHaveAccessibleName('Test label');
41
45
  });
@@ -39,7 +39,11 @@ describe('page navigation', () => {
39
39
  });
40
40
 
41
41
  test('Renders with the passed aria-label applied', () => {
42
- render(<PageNavigation aria-label="Test label">test</PageNavigation>);
42
+ render(
43
+ <PageNavigation aria-label="Test label" hasOverflowScroll>
44
+ test
45
+ </PageNavigation>
46
+ );
43
47
 
44
48
  expect(screen.getByText('test')).toHaveAccessibleName('Test label');
45
49
  });
@@ -786,7 +786,9 @@ exports[`Page Check page to verify grouped nav and breadcrumb - old / props synt
786
786
  >
787
787
  <div
788
788
  aria-label="test"
789
- class="pf-c-page__main-group pf-m-sticky-bottom pf-m-shadow-top"
789
+ class="pf-c-page__main-group pf-m-sticky-bottom pf-m-shadow-top pf-m-overflow-scroll"
790
+ role="region"
791
+ tabindex="0"
790
792
  >
791
793
  <div
792
794
  class="pf-c-page__main-nav"
@@ -34,6 +34,7 @@ exports[`page group Verify overflow scroll 1`] = `
34
34
  <DocumentFragment>
35
35
  <div
36
36
  class="pf-c-page__main-group pf-m-overflow-scroll"
37
+ role="region"
37
38
  tabindex="0"
38
39
  >
39
40
  test
@@ -48,6 +48,7 @@ exports[`page navigation Verify overflow scroll 1`] = `
48
48
  <DocumentFragment>
49
49
  <div
50
50
  class="pf-c-page__main-nav pf-m-overflow-scroll"
51
+ role="region"
51
52
  tabindex="0"
52
53
  >
53
54
  test
@@ -100,7 +100,9 @@ export const ProgressStep: React.FunctionComponent<ProgressStepProps> = ({
100
100
  id={titleId}
101
101
  ref={stepRef}
102
102
  {...(popoverRender && { type: 'button' })}
103
- {...(props.id !== undefined && titleId !== undefined && { 'aria-labelledby': `${props.id} ${titleId}` })}
103
+ {...(props.id !== undefined &&
104
+ titleId !== undefined &&
105
+ popoverRender && { 'aria-labelledby': `${props.id} ${titleId}` })}
104
106
  >
105
107
  {children}
106
108
  {popoverRender && popoverRender(stepRef)}
@@ -149,11 +149,11 @@ test('Does not renders with aria-labelledBy by default on Component element', ()
149
149
 
150
150
  test('Renders with an accessible name that matches children', () => {
151
151
  render(
152
- <ProgressStep id="test-id" titleId="title-id">
152
+ <ProgressStep popoverRender={stepRef => <div>Popover content</div>} id="test-id" titleId="title-id">
153
153
  Test
154
154
  </ProgressStep>
155
155
  );
156
- expect(screen.getByText('Test')).toHaveAccessibleName('Test');
156
+ expect(screen.getByText('Test')).toHaveAccessibleName('Test Popover content');
157
157
  });
158
158
 
159
159
  test('Renders with popoverRender element', () => {