@atlaskit/side-nav-items 1.13.9 → 1.14.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 +11 -0
- package/dist/cjs/ui/menu-section/menu-section.js +3 -1
- package/dist/es2019/ui/menu-section/menu-section.js +3 -1
- package/dist/esm/ui/menu-section/menu-section.js +3 -1
- package/dist/types/ui/menu-section/menu-section.d.ts +6 -1
- package/dist/types-ts4.5/ui/menu-section/menu-section.d.ts +6 -1
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @atlaskit/side-nav-items
|
|
2
2
|
|
|
3
|
+
## 1.14.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`bbc3cac269586`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bbc3cac269586) -
|
|
8
|
+
Add an accessible label to the Universal Create menu group for screen readers.
|
|
9
|
+
|
|
10
|
+
### Patch Changes
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
|
|
3
14
|
## 1.13.9
|
|
4
15
|
|
|
5
16
|
### Patch Changes
|
|
@@ -29,6 +29,7 @@ var _menuSectionContext = require("./menu-section-context");
|
|
|
29
29
|
var MenuSection = exports.MenuSection = function MenuSection(_ref) {
|
|
30
30
|
var children = _ref.children,
|
|
31
31
|
testId = _ref.testId,
|
|
32
|
+
ariaLabel = _ref.ariaLabel,
|
|
32
33
|
_ref$isMenuListItem = _ref.isMenuListItem,
|
|
33
34
|
isMenuListItem = _ref$isMenuListItem === void 0 ? false : _ref$isMenuListItem;
|
|
34
35
|
var id = (0, _useId.useId)();
|
|
@@ -36,7 +37,8 @@ var MenuSection = exports.MenuSection = function MenuSection(_ref) {
|
|
|
36
37
|
value: id
|
|
37
38
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
38
39
|
role: "group",
|
|
39
|
-
"aria-labelledby": "".concat(id, "-heading")
|
|
40
|
+
"aria-labelledby": "".concat(id, "-heading"),
|
|
41
|
+
"aria-label": ariaLabel
|
|
40
42
|
}, children));
|
|
41
43
|
if (isMenuListItem) {
|
|
42
44
|
return /*#__PURE__*/_react.default.createElement(_menuListItem.MenuListItem, {
|
|
@@ -22,6 +22,7 @@ import { MenuSectionContext } from './menu-section-context';
|
|
|
22
22
|
export const MenuSection = ({
|
|
23
23
|
children,
|
|
24
24
|
testId,
|
|
25
|
+
ariaLabel,
|
|
25
26
|
isMenuListItem = false
|
|
26
27
|
}) => {
|
|
27
28
|
const id = useId();
|
|
@@ -29,7 +30,8 @@ export const MenuSection = ({
|
|
|
29
30
|
value: id
|
|
30
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
31
32
|
role: "group",
|
|
32
|
-
"aria-labelledby": `${id}-heading
|
|
33
|
+
"aria-labelledby": `${id}-heading`,
|
|
34
|
+
"aria-label": ariaLabel
|
|
33
35
|
}, children));
|
|
34
36
|
if (isMenuListItem) {
|
|
35
37
|
return /*#__PURE__*/React.createElement(MenuListItem, {
|
|
@@ -22,6 +22,7 @@ import { MenuSectionContext } from './menu-section-context';
|
|
|
22
22
|
export var MenuSection = function MenuSection(_ref) {
|
|
23
23
|
var children = _ref.children,
|
|
24
24
|
testId = _ref.testId,
|
|
25
|
+
ariaLabel = _ref.ariaLabel,
|
|
25
26
|
_ref$isMenuListItem = _ref.isMenuListItem,
|
|
26
27
|
isMenuListItem = _ref$isMenuListItem === void 0 ? false : _ref$isMenuListItem;
|
|
27
28
|
var id = useId();
|
|
@@ -29,7 +30,8 @@ export var MenuSection = function MenuSection(_ref) {
|
|
|
29
30
|
value: id
|
|
30
31
|
}, /*#__PURE__*/React.createElement("div", {
|
|
31
32
|
role: "group",
|
|
32
|
-
"aria-labelledby": "".concat(id, "-heading")
|
|
33
|
+
"aria-labelledby": "".concat(id, "-heading"),
|
|
34
|
+
"aria-label": ariaLabel
|
|
33
35
|
}, children));
|
|
34
36
|
if (isMenuListItem) {
|
|
35
37
|
return /*#__PURE__*/React.createElement(MenuListItem, {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
type MenuSectionProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Accessible label for the grouped section content.
|
|
5
|
+
* When provided, this is applied via `aria-label`
|
|
6
|
+
*/
|
|
7
|
+
ariaLabel?: string;
|
|
3
8
|
/**
|
|
4
9
|
* The contents of the menu section.
|
|
5
10
|
* Should contain a `MenuSectionHeading`, and a `Divider` if appropriate.
|
|
@@ -37,5 +42,5 @@ type MenuSectionProps = {
|
|
|
37
42
|
* </MenuSection>
|
|
38
43
|
* ```
|
|
39
44
|
*/
|
|
40
|
-
export declare const MenuSection: ({ children, testId, isMenuListItem, }: MenuSectionProps) => JSX.Element;
|
|
45
|
+
export declare const MenuSection: ({ children, testId, ariaLabel, isMenuListItem, }: MenuSectionProps) => JSX.Element;
|
|
41
46
|
export {};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
type MenuSectionProps = {
|
|
3
|
+
/**
|
|
4
|
+
* Accessible label for the grouped section content.
|
|
5
|
+
* When provided, this is applied via `aria-label`
|
|
6
|
+
*/
|
|
7
|
+
ariaLabel?: string;
|
|
3
8
|
/**
|
|
4
9
|
* The contents of the menu section.
|
|
5
10
|
* Should contain a `MenuSectionHeading`, and a `Divider` if appropriate.
|
|
@@ -37,5 +42,5 @@ type MenuSectionProps = {
|
|
|
37
42
|
* </MenuSection>
|
|
38
43
|
* ```
|
|
39
44
|
*/
|
|
40
|
-
export declare const MenuSection: ({ children, testId, isMenuListItem, }: MenuSectionProps) => JSX.Element;
|
|
45
|
+
export declare const MenuSection: ({ children, testId, ariaLabel, isMenuListItem, }: MenuSectionProps) => JSX.Element;
|
|
41
46
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/side-nav-items",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.14.0",
|
|
4
4
|
"description": "Menu items and elements for the side nav area.",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -36,22 +36,22 @@
|
|
|
36
36
|
],
|
|
37
37
|
"atlaskit:src": "src/index.ts",
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@atlaskit/analytics-next": "^11.
|
|
39
|
+
"@atlaskit/analytics-next": "^11.3.0",
|
|
40
40
|
"@atlaskit/avatar": "^25.15.0",
|
|
41
41
|
"@atlaskit/button": "^23.11.0",
|
|
42
42
|
"@atlaskit/css": "^0.19.0",
|
|
43
43
|
"@atlaskit/ds-lib": "^7.0.0",
|
|
44
44
|
"@atlaskit/heading": "^5.4.0",
|
|
45
|
-
"@atlaskit/icon": "^35.
|
|
45
|
+
"@atlaskit/icon": "^35.4.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags-react": "^0.5.0",
|
|
48
|
-
"@atlaskit/popup": "^4.
|
|
48
|
+
"@atlaskit/popup": "^4.24.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop": "^1.8.0",
|
|
50
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.
|
|
50
|
+
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.2.0",
|
|
51
51
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^3.2.0",
|
|
52
52
|
"@atlaskit/primitives": "^19.0.0",
|
|
53
|
-
"@atlaskit/tokens": "^13.
|
|
54
|
-
"@atlaskit/tooltip": "^22.
|
|
53
|
+
"@atlaskit/tokens": "^13.3.0",
|
|
54
|
+
"@atlaskit/tooltip": "^22.6.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
56
|
"@compiled/react": "^0.20.0",
|
|
57
57
|
"tiny-invariant": "^1.2.0"
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"@atlaskit/lozenge": "^13.8.0",
|
|
69
69
|
"@atlaskit/navigation-system": "^9.4.0",
|
|
70
70
|
"@atlaskit/ssr": "workspace:^",
|
|
71
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
71
|
+
"@atlassian/a11y-jest-testing": "^0.12.0",
|
|
72
72
|
"@atlassian/a11y-playwright-testing": "^0.10.0",
|
|
73
73
|
"@atlassian/feature-flags-test-utils": "^1.1.0",
|
|
74
74
|
"@atlassian/react-compiler-gating": "workspace:^",
|