@atlaskit/editor-toolbar 0.19.13 → 0.19.15
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,19 @@
|
|
|
1
1
|
# @atlaskit/editor-toolbar
|
|
2
2
|
|
|
3
|
+
## 0.19.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`9b8e6a65567af`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b8e6a65567af) -
|
|
8
|
+
ENGHEALTH-48871: Fix aria-required-children a11y issue with Editor toolbar.
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 0.19.14
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 0.19.13
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -14,6 +14,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
14
14
|
var _css = require("@atlaskit/css");
|
|
15
15
|
var _dropdownMenu = require("@atlaskit/dropdown-menu");
|
|
16
16
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
17
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
18
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
19
|
var _ToolbarDropdownMenuContext = require("./ToolbarDropdownMenuContext");
|
|
19
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
@@ -35,13 +36,16 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
35
36
|
onClick = _ref.onClick,
|
|
36
37
|
tabIndex = _ref.tabIndex;
|
|
37
38
|
return /*#__PURE__*/_react.default.createElement(_compiled.Pressable, {
|
|
39
|
+
role: (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
38
40
|
testId: testId,
|
|
39
41
|
xcss: (0, _css.cx)(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
40
42
|
onClick: onClick,
|
|
41
43
|
tabIndex: tabIndex,
|
|
42
44
|
"aria-haspopup": ariaHasPopup,
|
|
43
|
-
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
44
|
-
|
|
45
|
+
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
46
|
+
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
47
|
+
,
|
|
48
|
+
"aria-pressed": (0, _expValEquals.expValEquals)('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
45
49
|
"aria-disabled": ariaDisabled,
|
|
46
50
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
47
51
|
"data-toolbar-component": (0, _experiments.editorExperiment)('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
@@ -5,6 +5,7 @@ import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
|
5
5
|
import { cx } from '@atlaskit/css';
|
|
6
6
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
7
7
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
8
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
10
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
10
11
|
const styles = {
|
|
@@ -23,13 +24,16 @@ const CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(({
|
|
|
23
24
|
onClick,
|
|
24
25
|
tabIndex
|
|
25
26
|
}, ref) => /*#__PURE__*/React.createElement(Pressable, {
|
|
27
|
+
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
26
28
|
testId: testId,
|
|
27
29
|
xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
28
30
|
onClick: onClick,
|
|
29
31
|
tabIndex: tabIndex,
|
|
30
32
|
"aria-haspopup": ariaHasPopup,
|
|
31
|
-
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
32
|
-
|
|
33
|
+
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
34
|
+
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
35
|
+
,
|
|
36
|
+
"aria-pressed": expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
33
37
|
"aria-disabled": ariaDisabled,
|
|
34
38
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
35
39
|
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
|
@@ -8,6 +8,7 @@ import React, { forwardRef, isValidElement, cloneElement } from 'react';
|
|
|
8
8
|
import { cx } from '@atlaskit/css';
|
|
9
9
|
import { DropdownItem } from '@atlaskit/dropdown-menu';
|
|
10
10
|
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
11
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
12
13
|
import { useToolbarDropdownMenu } from './ToolbarDropdownMenuContext';
|
|
13
14
|
var styles = {
|
|
@@ -26,13 +27,16 @@ var CustomDropdownMenuItemButton = /*#__PURE__*/forwardRef(function (_ref, ref)
|
|
|
26
27
|
onClick = _ref.onClick,
|
|
27
28
|
tabIndex = _ref.tabIndex;
|
|
28
29
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
30
|
+
role: expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? 'menuitem' : undefined,
|
|
29
31
|
testId: testId,
|
|
30
32
|
xcss: cx(styles.toolbarDropdownItem, ariaDisabled ? styles.disabled : ariaPressed ? styles.selected : styles.enabled),
|
|
31
33
|
onClick: onClick,
|
|
32
34
|
tabIndex: tabIndex,
|
|
33
35
|
"aria-haspopup": ariaHasPopup,
|
|
34
|
-
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
35
|
-
|
|
36
|
+
"aria-expanded": ariaHasPopup ? ariaPressed ? true : false : undefined
|
|
37
|
+
// platform_editor_enghealth_a11y_jan_fixes: menuitem roles cannot have aria-pressed attribute
|
|
38
|
+
,
|
|
39
|
+
"aria-pressed": expValEquals('platform_editor_enghealth_a11y_jan_fixes', 'isEnabled', true) ? undefined : ariaPressed,
|
|
36
40
|
"aria-disabled": ariaDisabled,
|
|
37
41
|
"aria-keyshortcuts": ariaKeyshortcuts,
|
|
38
42
|
"data-toolbar-component": editorExperiment('platform_synced_block', true) ? 'menu-item' : undefined,
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"registry": "https://registry.npmjs.org/"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.19.
|
|
6
|
+
"version": "0.19.15",
|
|
7
7
|
"description": "Common UI for Toolbars across the platform",
|
|
8
8
|
"atlassian": {
|
|
9
9
|
"team": "Editor: Jenga",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
31
31
|
"@atlaskit/popup": "^4.13.0",
|
|
32
32
|
"@atlaskit/primitives": "^18.0.0",
|
|
33
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
33
|
+
"@atlaskit/tmp-editor-statsig": "^19.0.0",
|
|
34
34
|
"@atlaskit/tokens": "^11.0.0",
|
|
35
35
|
"@atlaskit/tooltip": "^20.14.0",
|
|
36
36
|
"@babel/runtime": "^7.0.0",
|