@atlaskit/navigation-system 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/dist/cjs/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +2 -3
- package/dist/cjs/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +2 -1
- package/dist/es2019/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +2 -3
- package/dist/es2019/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +2 -1
- package/dist/esm/ui/menu-item/expandable-menu-item/expandable-menu-item-trigger.js +2 -3
- package/dist/esm/ui/menu-item/flyout-menu-item/flyout-menu-item-content.js +2 -1
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,53 @@
|
|
|
1
1
|
# @atlassian/navigation-system
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`ca468a8bbccd9`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ca468a8bbccd9) -
|
|
8
|
+
The elemBefore chevron icon button in the link (selectable) variants of
|
|
9
|
+
`ExpandableMenuItemTrigger` is now labelled by the menu item (specifically, its anchor element)
|
|
10
|
+
through the aria-labelledby attribute. This is to provide context on what will be expanded or
|
|
11
|
+
collapsed to screen readers. Assistive technology users will still have the `aria-expanded`
|
|
12
|
+
attribute to determine the expanded state.
|
|
13
|
+
|
|
14
|
+
This change was previously behind a feature flag, which has now been removed.
|
|
15
|
+
|
|
16
|
+
**More details:**
|
|
17
|
+
|
|
18
|
+
Previously, the chevron icon button would be labelled by the hardcoded strings "Expand" or
|
|
19
|
+
"Collapse" - which is not helpful for screen readers.
|
|
20
|
+
|
|
21
|
+
Now, the chevron icon button is labelled by the menu item trigger content (children).
|
|
22
|
+
|
|
23
|
+
For example, for the below expandable menu item trigger:
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
<ExpandableMenuItemTrigger href="#">Recent</ExpandableMenuItemTrigger>
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Previously, the chevron icon button would be a `button` element with the name "Expand" or
|
|
30
|
+
"Collapse", based on the expanded state.
|
|
31
|
+
|
|
32
|
+
Now, the chevron icon button will be a `button` element with the name "Recent".
|
|
33
|
+
|
|
34
|
+
You will likely need to update your tests to account for this change, by using a different
|
|
35
|
+
selector.
|
|
36
|
+
|
|
37
|
+
### Patch Changes
|
|
38
|
+
|
|
39
|
+
- Updated dependencies
|
|
40
|
+
|
|
41
|
+
## 1.2.0
|
|
42
|
+
|
|
43
|
+
### Minor Changes
|
|
44
|
+
|
|
45
|
+
- [`c48c55f280ef8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c48c55f280ef8) -
|
|
46
|
+
FlyoutMenuItemContent will render its popup alongside the trigger, instead of using a portal. This
|
|
47
|
+
improves the experience for assistive technology users.
|
|
48
|
+
|
|
49
|
+
This change is behind a feature flag.
|
|
50
|
+
|
|
3
51
|
## 1.1.0
|
|
4
52
|
|
|
5
53
|
### Minor Changes
|
|
@@ -14,7 +14,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _new = require("@atlaskit/button/new");
|
|
15
15
|
var _chevronDown = _interopRequireDefault(require("@atlaskit/icon/core/chevron-down"));
|
|
16
16
|
var _chevronRight = _interopRequireDefault(require("@atlaskit/icon/core/chevron-right"));
|
|
17
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
18
17
|
var _menuItem = require("../menu-item");
|
|
19
18
|
var _useScrollMenuItemIntoView = require("../use-scroll-menu-item-into-view");
|
|
20
19
|
var _expandableMenuItemContext = require("./expandable-menu-item-context");
|
|
@@ -108,11 +107,11 @@ var ExpandableMenuItemTrigger = exports.ExpandableMenuItemTrigger = /*#__PURE__*
|
|
|
108
107
|
// `aria-expanded` attribute to indicate the expanded state of the menu item.
|
|
109
108
|
// We are not using the `aria-label` attribute here as it is not supported by the `IconButton` component.
|
|
110
109
|
,
|
|
111
|
-
"aria-labelledby":
|
|
110
|
+
"aria-labelledby": id
|
|
112
111
|
// IconButton requires a label prop, however it will not be used by screen readers as we are setting
|
|
113
112
|
// `aria-labelledby`, which will be used instead.
|
|
114
113
|
,
|
|
115
|
-
label:
|
|
114
|
+
label: "",
|
|
116
115
|
appearance: "subtle",
|
|
117
116
|
spacing: "compact",
|
|
118
117
|
onClick: handleIconClick,
|
|
@@ -60,7 +60,8 @@ var FlyoutMenuItemContent = exports.FlyoutMenuItemContent = /*#__PURE__*/(0, _re
|
|
|
60
60
|
* and should have negligible performance impacts, because the flyout menus should rarely
|
|
61
61
|
* need to be repositioned.
|
|
62
62
|
*/,
|
|
63
|
-
shouldDisableGpuAcceleration: true
|
|
63
|
+
shouldDisableGpuAcceleration: true,
|
|
64
|
+
shouldRenderToParent: (0, _platformFeatureFlags.fg)('platform_dst_nav4_flyoutmenuitem_render_to_parent')
|
|
64
65
|
}, function (_ref2) {
|
|
65
66
|
var update = _ref2.update;
|
|
66
67
|
return /*#__PURE__*/_react.default.createElement(UpdatePopperOnContentResize, {
|
|
@@ -6,7 +6,6 @@ import React, { forwardRef, useCallback, useId, useRef } from 'react';
|
|
|
6
6
|
import { IconButton } from '@atlaskit/button/new';
|
|
7
7
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
8
8
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { MenuItemBase, nestedOpenPopupCSSSelector } from '../menu-item';
|
|
11
10
|
import { useScrollMenuItemIntoView } from '../use-scroll-menu-item-into-view';
|
|
12
11
|
import { useIsExpanded, useOnExpansionToggle, useSetIsExpanded } from './expandable-menu-item-context';
|
|
@@ -99,11 +98,11 @@ export const ExpandableMenuItemTrigger = /*#__PURE__*/forwardRef(({
|
|
|
99
98
|
// `aria-expanded` attribute to indicate the expanded state of the menu item.
|
|
100
99
|
// We are not using the `aria-label` attribute here as it is not supported by the `IconButton` component.
|
|
101
100
|
,
|
|
102
|
-
"aria-labelledby":
|
|
101
|
+
"aria-labelledby": id
|
|
103
102
|
// IconButton requires a label prop, however it will not be used by screen readers as we are setting
|
|
104
103
|
// `aria-labelledby`, which will be used instead.
|
|
105
104
|
,
|
|
106
|
-
label:
|
|
105
|
+
label: "",
|
|
107
106
|
appearance: "subtle",
|
|
108
107
|
spacing: "compact",
|
|
109
108
|
onClick: handleIconClick,
|
|
@@ -51,7 +51,8 @@ export const FlyoutMenuItemContent = /*#__PURE__*/forwardRef(({
|
|
|
51
51
|
* and should have negligible performance impacts, because the flyout menus should rarely
|
|
52
52
|
* need to be repositioned.
|
|
53
53
|
*/,
|
|
54
|
-
shouldDisableGpuAcceleration: true
|
|
54
|
+
shouldDisableGpuAcceleration: true,
|
|
55
|
+
shouldRenderToParent: fg('platform_dst_nav4_flyoutmenuitem_render_to_parent')
|
|
55
56
|
}, ({
|
|
56
57
|
update
|
|
57
58
|
}) => /*#__PURE__*/React.createElement(UpdatePopperOnContentResize, {
|
|
@@ -6,7 +6,6 @@ import React, { forwardRef, useCallback, useId, useRef } from 'react';
|
|
|
6
6
|
import { IconButton } from '@atlaskit/button/new';
|
|
7
7
|
import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
|
|
8
8
|
import ChevronRightIcon from '@atlaskit/icon/core/chevron-right';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { MenuItemBase, nestedOpenPopupCSSSelector } from '../menu-item';
|
|
11
10
|
import { useScrollMenuItemIntoView } from '../use-scroll-menu-item-into-view';
|
|
12
11
|
import { useIsExpanded, useOnExpansionToggle, useSetIsExpanded } from './expandable-menu-item-context';
|
|
@@ -99,11 +98,11 @@ export var ExpandableMenuItemTrigger = /*#__PURE__*/forwardRef(function (_ref2,
|
|
|
99
98
|
// `aria-expanded` attribute to indicate the expanded state of the menu item.
|
|
100
99
|
// We are not using the `aria-label` attribute here as it is not supported by the `IconButton` component.
|
|
101
100
|
,
|
|
102
|
-
"aria-labelledby":
|
|
101
|
+
"aria-labelledby": id
|
|
103
102
|
// IconButton requires a label prop, however it will not be used by screen readers as we are setting
|
|
104
103
|
// `aria-labelledby`, which will be used instead.
|
|
105
104
|
,
|
|
106
|
-
label:
|
|
105
|
+
label: "",
|
|
107
106
|
appearance: "subtle",
|
|
108
107
|
spacing: "compact",
|
|
109
108
|
onClick: handleIconClick,
|
|
@@ -51,7 +51,8 @@ export var FlyoutMenuItemContent = /*#__PURE__*/forwardRef(function (_ref, forwa
|
|
|
51
51
|
* and should have negligible performance impacts, because the flyout menus should rarely
|
|
52
52
|
* need to be repositioned.
|
|
53
53
|
*/,
|
|
54
|
-
shouldDisableGpuAcceleration: true
|
|
54
|
+
shouldDisableGpuAcceleration: true,
|
|
55
|
+
shouldRenderToParent: fg('platform_dst_nav4_flyoutmenuitem_render_to_parent')
|
|
55
56
|
}, function (_ref2) {
|
|
56
57
|
var update = _ref2.update;
|
|
57
58
|
return /*#__PURE__*/React.createElement(UpdatePopperOnContentResize, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/navigation-system",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "The latest navigation system for Atlassian apps.",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-mirror",
|
|
6
6
|
"author": "Atlassian Pty Ltd",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"@atlaskit/button": "^23.4.0",
|
|
113
113
|
"@atlaskit/css": "^0.12.0",
|
|
114
114
|
"@atlaskit/ds-lib": "^5.0.0",
|
|
115
|
-
"@atlaskit/icon": "^28.
|
|
115
|
+
"@atlaskit/icon": "^28.1.0",
|
|
116
116
|
"@atlaskit/layering": "^3.0.0",
|
|
117
117
|
"@atlaskit/logo": "^19.7.0",
|
|
118
118
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
@@ -120,8 +120,8 @@
|
|
|
120
120
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
121
121
|
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0",
|
|
122
122
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
123
|
-
"@atlaskit/primitives": "^14.
|
|
124
|
-
"@atlaskit/tokens": "^6.
|
|
123
|
+
"@atlaskit/primitives": "^14.12.0",
|
|
124
|
+
"@atlaskit/tokens": "^6.1.0",
|
|
125
125
|
"@atlaskit/tooltip": "^20.4.0",
|
|
126
126
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
127
127
|
"@babel/runtime": "^7.0.0",
|
|
@@ -214,14 +214,14 @@
|
|
|
214
214
|
"platform_dst_nav4_flyout_use_capture_outside": {
|
|
215
215
|
"type": "boolean"
|
|
216
216
|
},
|
|
217
|
-
"platform_dst_expandable_menu_item_elembefore_label": {
|
|
218
|
-
"type": "boolean"
|
|
219
|
-
},
|
|
220
217
|
"platform_dst_nav4_skip_links_hydration_fix": {
|
|
221
218
|
"type": "boolean"
|
|
222
219
|
},
|
|
223
220
|
"platform_dst_nav4_actionsonhover_focus_fix": {
|
|
224
221
|
"type": "boolean"
|
|
222
|
+
},
|
|
223
|
+
"platform_dst_nav4_flyoutmenuitem_render_to_parent": {
|
|
224
|
+
"type": "boolean"
|
|
225
225
|
}
|
|
226
226
|
},
|
|
227
227
|
"homepage": "https://atlassian.design/components/navigation-system"
|