@atlaskit/page-layout 1.7.10 → 1.7.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/page-layout
2
2
 
3
+ ## 1.7.11
4
+
5
+ ### Patch Changes
6
+
7
+ - [`edb659b9f7b`](https://bitbucket.org/atlassian/atlassian-frontend/commits/edb659b9f7b) - Reverts changes that added aria-hidden to key interactive navigational elements
8
+
3
9
  ## 1.7.10
4
10
 
5
11
  ### Patch Changes
@@ -67,6 +67,7 @@ var GrabArea = function GrabArea(_ref) {
67
67
  "aria-label": label,
68
68
  "data-testid": testId,
69
69
  disabled: isDisabled,
70
+ "aria-hidden": isLeftSidebarCollapsed,
70
71
  type: "button"
71
72
  // The separator role is applied to a button to utilize the native
72
73
  // interactive and disabled functionality on the resize separator. While a
@@ -98,7 +98,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
98
98
  * On mobile, the `onClick` handler controls the toggled flyout behaviour.
99
99
  * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
100
100
  */
101
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
101
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
102
102
  (0, _react2.jsx)("div", (0, _extends2.default)({
103
103
  css: [
104
104
  // mobile breakpoint styles
@@ -111,8 +111,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
111
111
  onMouseOver: onMouseOver,
112
112
  onMouseLeave: onMouseLeave,
113
113
  onClick: onClick,
114
- ref: ref,
115
- "aria-hidden": "true"
114
+ ref: ref
116
115
  }, selector), children)
117
116
  );
118
117
  });
@@ -43,12 +43,15 @@ var ResizableChildrenWrapper = function ResizableChildrenWrapper(_ref) {
43
43
  _ref$hasCollapsedStat = _ref.hasCollapsedState,
44
44
  hasCollapsedState = _ref$hasCollapsedStat === void 0 ? false : _ref$hasCollapsedStat,
45
45
  _ref$isFlyoutOpen = _ref.isFlyoutOpen,
46
- isFlyoutOpen = _ref$isFlyoutOpen === void 0 ? false : _ref$isFlyoutOpen;
46
+ isFlyoutOpen = _ref$isFlyoutOpen === void 0 ? false : _ref$isFlyoutOpen,
47
+ testId = _ref.testId;
47
48
  var isCollapsing = (0, _hooks.useIsSidebarCollapsing)();
48
49
  var isCollapsed = isLeftSidebarCollapsed || hasCollapsedState;
49
50
  var isHidden = isCollapsing || isCollapsed && !isFlyoutOpen;
50
51
  return (0, _react.jsx)("div", {
51
- css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles]
52
+ css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
53
+ "aria-hidden": isHidden,
54
+ "data-testid": testId
52
55
  }, (0, _react.jsx)("div", {
53
56
  css: fixedChildrenWrapperStyles
54
57
  }, children));
@@ -297,8 +297,16 @@ var LeftSidebar = function LeftSidebar(props) {
297
297
  isDisabled: !isFlyoutOpen
298
298
  });
299
299
  }
300
- return (0, _react2.jsx)(_react.Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && (0, _react2.jsx)("div", {
301
- "aria-hidden": "true",
300
+ return (0, _react2.jsx)(_react.Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') &&
301
+ /**
302
+ * On desktop, the `onClick` handlers controls the temporary flyout behavior.
303
+ * This is an intentionally mouse-only experience, it may even be disruptive with keyboard navigation.
304
+ *
305
+ * On mobile, the `onClick` handler controls the toggled flyout behaviour.
306
+ * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
307
+ */
308
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
309
+ (0, _react2.jsx)("div", {
302
310
  css: [hiddenBackdropStyles, isFlyoutOpen && openBackdropStyles],
303
311
  onClick: closeMobileFlyout
304
312
  }), (0, _react2.jsx)(_leftSidebarOuter.default, {
@@ -319,7 +327,8 @@ var LeftSidebar = function LeftSidebar(props) {
319
327
  }, (0, _react2.jsx)(_resizableChildrenWrapper.default, {
320
328
  isFlyoutOpen: isFlyoutOpen,
321
329
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
322
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed'
330
+ hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
331
+ testId: testId && "".concat(testId, "-resize-children-wrapper")
323
332
  }, children), (0, _react2.jsx)(_resizeControl.default, {
324
333
  testId: testId,
325
334
  resizeGrabAreaLabel: resizeGrabAreaLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "sideEffects": false
5
5
  }
@@ -66,6 +66,7 @@ const GrabArea = ({
66
66
  "aria-label": label,
67
67
  "data-testid": testId,
68
68
  disabled: isDisabled,
69
+ "aria-hidden": isLeftSidebarCollapsed,
69
70
  type: "button"
70
71
  // The separator role is applied to a button to utilize the native
71
72
  // interactive and disabled functionality on the resize separator. While a
@@ -99,7 +99,7 @@ const LeftSidebarOuter = ({
99
99
  * On mobile, the `onClick` handler controls the toggled flyout behaviour.
100
100
  * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
101
101
  */
102
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
102
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
103
103
  jsx("div", _extends({
104
104
  css: [
105
105
  // mobile breakpoint styles
@@ -112,8 +112,7 @@ const LeftSidebarOuter = ({
112
112
  onMouseOver: onMouseOver,
113
113
  onMouseLeave: onMouseLeave,
114
114
  onClick: onClick,
115
- ref: ref,
116
- "aria-hidden": "true"
115
+ ref: ref
117
116
  }, selector), children));
118
117
  };
119
118
  export default /*#__PURE__*/forwardRef(LeftSidebarOuter);
@@ -34,13 +34,16 @@ const ResizableChildrenWrapper = ({
34
34
  children,
35
35
  isLeftSidebarCollapsed = false,
36
36
  hasCollapsedState = false,
37
- isFlyoutOpen = false
37
+ isFlyoutOpen = false,
38
+ testId
38
39
  }) => {
39
40
  const isCollapsing = useIsSidebarCollapsing();
40
41
  const isCollapsed = isLeftSidebarCollapsed || hasCollapsedState;
41
42
  const isHidden = isCollapsing || isCollapsed && !isFlyoutOpen;
42
43
  return jsx("div", {
43
- css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles]
44
+ css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
45
+ "aria-hidden": isHidden,
46
+ "data-testid": testId
44
47
  }, jsx("div", {
45
48
  css: fixedChildrenWrapperStyles
46
49
  }, children));
@@ -296,8 +296,16 @@ const LeftSidebar = props => {
296
296
  isDisabled: !isFlyoutOpen
297
297
  });
298
298
  }
299
- return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && jsx("div", {
300
- "aria-hidden": "true",
299
+ return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') &&
300
+ /**
301
+ * On desktop, the `onClick` handlers controls the temporary flyout behavior.
302
+ * This is an intentionally mouse-only experience, it may even be disruptive with keyboard navigation.
303
+ *
304
+ * On mobile, the `onClick` handler controls the toggled flyout behaviour.
305
+ * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
306
+ */
307
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
308
+ jsx("div", {
301
309
  css: [hiddenBackdropStyles, isFlyoutOpen && openBackdropStyles],
302
310
  onClick: closeMobileFlyout
303
311
  }), jsx(LeftSidebarOuter, {
@@ -318,7 +326,8 @@ const LeftSidebar = props => {
318
326
  }, jsx(ResizableChildrenWrapper, {
319
327
  isFlyoutOpen: isFlyoutOpen,
320
328
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
321
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed'
329
+ hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
330
+ testId: testId && `${testId}-resize-children-wrapper`
322
331
  }, children), jsx(ResizeControl, {
323
332
  testId: testId,
324
333
  resizeGrabAreaLabel: resizeGrabAreaLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "sideEffects": false
5
5
  }
@@ -61,6 +61,7 @@ var GrabArea = function GrabArea(_ref) {
61
61
  "aria-label": label,
62
62
  "data-testid": testId,
63
63
  disabled: isDisabled,
64
+ "aria-hidden": isLeftSidebarCollapsed,
64
65
  type: "button"
65
66
  // The separator role is applied to a button to utilize the native
66
67
  // interactive and disabled functionality on the resize separator. While a
@@ -90,7 +90,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
90
90
  * On mobile, the `onClick` handler controls the toggled flyout behaviour.
91
91
  * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
92
92
  */
93
- // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events
93
+ // eslint-disable-next-line jsx-a11y/mouse-events-have-key-events, jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
94
94
  jsx("div", _extends({
95
95
  css: [
96
96
  // mobile breakpoint styles
@@ -103,8 +103,7 @@ var LeftSidebarOuter = function LeftSidebarOuter(_ref, ref) {
103
103
  onMouseOver: onMouseOver,
104
104
  onMouseLeave: onMouseLeave,
105
105
  onClick: onClick,
106
- ref: ref,
107
- "aria-hidden": "true"
106
+ ref: ref
108
107
  }, selector), children)
109
108
  );
110
109
  });
@@ -37,12 +37,15 @@ var ResizableChildrenWrapper = function ResizableChildrenWrapper(_ref) {
37
37
  _ref$hasCollapsedStat = _ref.hasCollapsedState,
38
38
  hasCollapsedState = _ref$hasCollapsedStat === void 0 ? false : _ref$hasCollapsedStat,
39
39
  _ref$isFlyoutOpen = _ref.isFlyoutOpen,
40
- isFlyoutOpen = _ref$isFlyoutOpen === void 0 ? false : _ref$isFlyoutOpen;
40
+ isFlyoutOpen = _ref$isFlyoutOpen === void 0 ? false : _ref$isFlyoutOpen,
41
+ testId = _ref.testId;
41
42
  var isCollapsing = useIsSidebarCollapsing();
42
43
  var isCollapsed = isLeftSidebarCollapsed || hasCollapsedState;
43
44
  var isHidden = isCollapsing || isCollapsed && !isFlyoutOpen;
44
45
  return jsx("div", {
45
- css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles]
46
+ css: [resizableChildrenWrapperStyles, isHidden && hideLeftSidebarContentsStyles, prefersReducedMotionStyles],
47
+ "aria-hidden": isHidden,
48
+ "data-testid": testId
46
49
  }, jsx("div", {
47
50
  css: fixedChildrenWrapperStyles
48
51
  }, children));
@@ -293,8 +293,16 @@ var LeftSidebar = function LeftSidebar(props) {
293
293
  isDisabled: !isFlyoutOpen
294
294
  });
295
295
  }
296
- return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') && jsx("div", {
297
- "aria-hidden": "true",
296
+ return jsx(Fragment, null, (mobileMediaQuery === null || mobileMediaQuery === void 0 ? void 0 : mobileMediaQuery.matches) && getBooleanFF('platform.design-system-team.responsive-page-layout-left-sidebar_p8r7g') &&
297
+ /**
298
+ * On desktop, the `onClick` handlers controls the temporary flyout behavior.
299
+ * This is an intentionally mouse-only experience, it may even be disruptive with keyboard navigation.
300
+ *
301
+ * On mobile, the `onClick` handler controls the toggled flyout behaviour.
302
+ * This is not intended to be how you use this with a keyboard, there is a ResizeButton for this intentionally instead.
303
+ */
304
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
305
+ jsx("div", {
298
306
  css: [hiddenBackdropStyles, isFlyoutOpen && openBackdropStyles],
299
307
  onClick: closeMobileFlyout
300
308
  }), jsx(LeftSidebarOuter, {
@@ -315,7 +323,8 @@ var LeftSidebar = function LeftSidebar(props) {
315
323
  }, jsx(ResizableChildrenWrapper, {
316
324
  isFlyoutOpen: isFlyoutOpen,
317
325
  isLeftSidebarCollapsed: isLeftSidebarCollapsed,
318
- hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed'
326
+ hasCollapsedState: !notFirstRun.current && collapsedState === 'collapsed',
327
+ testId: testId && "".concat(testId, "-resize-children-wrapper")
319
328
  }, children), jsx(ResizeControl, {
320
329
  testId: testId,
321
330
  resizeGrabAreaLabel: resizeGrabAreaLabel,
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "sideEffects": false
5
5
  }
@@ -6,6 +6,7 @@ type ResizableChildrenWrapperProps = {
6
6
  isFlyoutOpen?: boolean;
7
7
  isLeftSidebarCollapsed?: boolean;
8
8
  hasCollapsedState?: boolean;
9
+ testId?: string;
9
10
  };
10
- declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
11
+ declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, testId, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
11
12
  export default ResizableChildrenWrapper;
@@ -6,6 +6,7 @@ type ResizableChildrenWrapperProps = {
6
6
  isFlyoutOpen?: boolean;
7
7
  isLeftSidebarCollapsed?: boolean;
8
8
  hasCollapsedState?: boolean;
9
+ testId?: string;
9
10
  };
10
- declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
11
+ declare const ResizableChildrenWrapper: ({ children, isLeftSidebarCollapsed, hasCollapsedState, isFlyoutOpen, testId, }: ResizableChildrenWrapperProps) => jsx.JSX.Element;
11
12
  export default ResizableChildrenWrapper;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/page-layout",
3
- "version": "1.7.10",
3
+ "version": "1.7.11",
4
4
  "description": "A collection of components which let you compose an application's page layout.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"