@atlaskit/editor-toolbar 2.7.9 → 2.7.10
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,15 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 2.7.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`202069bab1e36`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/202069bab1e36) -
|
|
8
|
+
Clean up the shipped `platform_editor_enghealth_a11y_jan_fixes` experiment. Toolbar dropdown items
|
|
9
|
+
now always render with `role="menuitem"` and without `aria-pressed`, the block menu always has
|
|
10
|
+
`role="menu"`, and show-diff deleted content always uses the a11y-fixed styles.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
3
13
|
## 2.7.9
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -49,7 +49,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
49
49
|
dataExtensionItemKey = _ref['data-extension-item-key'],
|
|
50
50
|
itemRole = _ref.itemRole;
|
|
51
51
|
return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
52
|
-
role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
52
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
53
53
|
testId: testId,
|
|
54
54
|
xcss: (0, _css.cx)(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
55
55
|
onClick: onClick,
|
|
@@ -60,10 +60,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
60
60
|
tabIndex: tabIndex,
|
|
61
61
|
"aria-haspopup": ariaHasPopup,
|
|
62
62
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
63
|
-
"aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
64
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
65
|
-
,
|
|
66
|
-
"aria-pressed": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
63
|
+
"aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
67
64
|
"aria-disabled": ariaDisabled,
|
|
68
65
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
69
66
|
"data-toolbar-component": "menu-item",
|
|
@@ -92,7 +89,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
92
89
|
itemRole = _ref2.itemRole,
|
|
93
90
|
dataAttributes = (0, _objectWithoutProperties2.default)(_ref2, _excluded);
|
|
94
91
|
return /*#__PURE__*/_react.default.createElement(_compiled.Anchor, (0, _extends2.default)({
|
|
95
|
-
role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
92
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
96
93
|
testId: testId,
|
|
97
94
|
xcss: (0, _css.cx)(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
98
95
|
onClick: onClick,
|
|
@@ -103,10 +100,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
103
100
|
tabIndex: tabIndex,
|
|
104
101
|
"aria-haspopup": ariaHasPopup,
|
|
105
102
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
106
|
-
"aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
107
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
108
|
-
,
|
|
109
|
-
"aria-pressed": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
103
|
+
"aria-checked": (0, _expValEquals.expValEquals)('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
110
104
|
"aria-disabled": ariaDisabled,
|
|
111
105
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
112
106
|
"data-toolbar-component": "menu-item",
|
|
@@ -34,7 +34,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
34
34
|
'data-extension-item-key': dataExtensionItemKey,
|
|
35
35
|
itemRole
|
|
36
36
|
}, ref) => /*#__PURE__*/React.createElement(Pressable, {
|
|
37
|
-
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
37
|
+
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
38
38
|
testId: testId,
|
|
39
39
|
xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
40
40
|
onClick: onClick,
|
|
@@ -45,10 +45,7 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
45
45
|
tabIndex: tabIndex,
|
|
46
46
|
"aria-haspopup": ariaHasPopup,
|
|
47
47
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
48
|
-
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
49
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
50
|
-
,
|
|
51
|
-
"aria-pressed": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
48
|
+
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
52
49
|
"aria-disabled": ariaDisabled,
|
|
53
50
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
54
51
|
"data-toolbar-component": "menu-item",
|
|
@@ -76,7 +73,7 @@ const CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(({
|
|
|
76
73
|
itemRole,
|
|
77
74
|
...dataAttributes
|
|
78
75
|
}, ref) => /*#__PURE__*/React.createElement(Anchor, _extends({
|
|
79
|
-
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
76
|
+
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
80
77
|
testId: testId,
|
|
81
78
|
xcss: cx(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
82
79
|
onClick: onClick,
|
|
@@ -87,10 +84,7 @@ const CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(({
|
|
|
87
84
|
tabIndex: tabIndex,
|
|
88
85
|
"aria-haspopup": ariaHasPopup,
|
|
89
86
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
90
|
-
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
91
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
92
|
-
,
|
|
93
|
-
"aria-pressed": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
87
|
+
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
94
88
|
"aria-disabled": ariaDisabled,
|
|
95
89
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
96
90
|
"data-toolbar-component": "menu-item",
|
|
@@ -40,7 +40,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
40
40
|
dataExtensionItemKey = _ref['data-extension-item-key'],
|
|
41
41
|
itemRole = _ref.itemRole;
|
|
42
42
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
43
|
-
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
43
|
+
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
44
44
|
testId: testId,
|
|
45
45
|
xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
46
46
|
onClick: onClick,
|
|
@@ -51,10 +51,7 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
51
51
|
tabIndex: tabIndex,
|
|
52
52
|
"aria-haspopup": ariaHasPopup,
|
|
53
53
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
54
|
-
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
55
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
56
|
-
,
|
|
57
|
-
"aria-pressed": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
54
|
+
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
58
55
|
"aria-disabled": ariaDisabled,
|
|
59
56
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
60
57
|
"data-toolbar-component": "menu-item",
|
|
@@ -83,7 +80,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref)
|
|
|
83
80
|
itemRole = _ref2.itemRole,
|
|
84
81
|
dataAttributes = _objectWithoutProperties(_ref2, _excluded);
|
|
85
82
|
return /*#__PURE__*/React.createElement(Anchor, _extends({
|
|
86
|
-
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' :
|
|
83
|
+
role: expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? itemRole || 'menuitem' : 'menuitem',
|
|
87
84
|
testId: testId,
|
|
88
85
|
xcss: cx(styles.toolbarDropdownItem, styles.anchor, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
89
86
|
onClick: onClick,
|
|
@@ -94,10 +91,7 @@ var CustomDropdownMenuItemAnchor = /*#__PURE__*/forwardRef(function (_ref2, ref)
|
|
|
94
91
|
tabIndex: tabIndex,
|
|
95
92
|
"aria-haspopup": ariaHasPopup,
|
|
96
93
|
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined,
|
|
97
|
-
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined
|
|
98
|
-
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
99
|
-
,
|
|
100
|
-
"aria-pressed": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) ? undefined : expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
94
|
+
"aria-checked": expValEquals('platform_editor_layout_column_menu', 'isEnabled', true) && (itemRole === 'menuitemradio' || itemRole === 'menuitemcheckbox') ? ariaPressed : undefined,
|
|
101
95
|
"aria-disabled": ariaDisabled,
|
|
102
96
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
103
97
|
"data-toolbar-component": "menu-item",
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "2.7.
|
|
6
|
+
"version": "2.7.10",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"website": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"@atlaskit/popup": "^6.3.0",
|
|
46
46
|
"@atlaskit/primitives": "^22.5.0",
|
|
47
47
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
48
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
48
|
+
"@atlaskit/tmp-editor-statsig": "^207.0.0",
|
|
49
49
|
"@atlaskit/tokens": "^20.0.0",
|
|
50
50
|
"@atlaskit/tooltip": "^24.3.0",
|
|
51
51
|
"@babel/runtime": "^7.0.0",
|