@atlaskit/reactions 35.6.5 → 35.6.6
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 +19 -0
- package/dist/cjs/analytics/index.js +1 -1
- package/dist/cjs/components/Selector.js +8 -4
- package/dist/es2019/analytics/index.js +1 -1
- package/dist/es2019/components/Selector.js +8 -4
- package/dist/esm/analytics/index.js +1 -1
- package/dist/esm/components/Selector.js +8 -4
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @atlaskit/reactions
|
|
2
2
|
|
|
3
|
+
## 35.6.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`c75e9e104057f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c75e9e104057f) -
|
|
8
|
+
[ux] A11Y-35421: Fix screen readers announcing the reactions picker "More emojis" button as a list
|
|
9
|
+
item
|
|
10
|
+
|
|
11
|
+
The emoji reactions picker (`Selector`) previously wrapped its quick-reaction emoji buttons and
|
|
12
|
+
the "More emojis" button in `<ul>`/`<li>` list markup, causing screen readers to announce the
|
|
13
|
+
standalone "More emojis" button as a list item. Behind the
|
|
14
|
+
`platform_a11y_fixes_reactions_selector_list` experiment, the list markup is replaced with a
|
|
15
|
+
`<div>` container exposed as a labelled group (`role="group"` with an "Add reactions"
|
|
16
|
+
`aria-label`), so assistive technology still conveys that the controls belong together without the
|
|
17
|
+
misleading list-item semantics. The decorative separator is `aria-hidden`. There is no visual
|
|
18
|
+
change.
|
|
19
|
+
|
|
20
|
+
- Updated dependencies
|
|
21
|
+
|
|
3
22
|
## 35.6.5
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
|
@@ -11,7 +11,7 @@ var _analyticsGasTypes = require("@atlaskit/analytics-gas-types");
|
|
|
11
11
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
12
12
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } // eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
13
13
|
var packageName = "@atlaskit/reactions";
|
|
14
|
-
var packageVersion = "35.6.
|
|
14
|
+
var packageVersion = "35.6.5";
|
|
15
15
|
/**
|
|
16
16
|
* TODO: move to utility package?
|
|
17
17
|
* A random sampling function
|
|
@@ -38,7 +38,7 @@ var Reveal = function Reveal(_ref) {
|
|
|
38
38
|
var children = _ref.children,
|
|
39
39
|
testId = _ref.testId;
|
|
40
40
|
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
41
|
-
as:
|
|
41
|
+
as: (0, _expValEquals.expValEquals)('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true) ? undefined : 'li',
|
|
42
42
|
xcss: styles.emojiContainer
|
|
43
43
|
}, /*#__PURE__*/React.createElement("div", {
|
|
44
44
|
"data-testid": testId,
|
|
@@ -101,13 +101,17 @@ var Selector = exports.Selector = function Selector(_ref2) {
|
|
|
101
101
|
xcss: hoverableReactionPickerSelector ? styles.hoverableReactionPickerSelectorContainer : styles.container
|
|
102
102
|
}, quickReactionEmojiIds.map(renderEmoji)));
|
|
103
103
|
}
|
|
104
|
+
var isSelectorListMarkupFixEnabled = (0, _expValEquals.expValEquals)('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true);
|
|
104
105
|
return /*#__PURE__*/React.createElement(_compiled.Inline, {
|
|
105
106
|
alignBlock: "center",
|
|
106
107
|
xcss: styles.container,
|
|
107
|
-
as:
|
|
108
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'ul',
|
|
109
|
+
role: isSelectorListMarkupFixEnabled ? 'group' : undefined,
|
|
110
|
+
"aria-label": isSelectorListMarkupFixEnabled ? _i18n.messages.popperWrapperLabel.defaultMessage : undefined
|
|
108
111
|
}, quickReactionEmojiIds.map(renderEmoji), showMore ? /*#__PURE__*/React.createElement(_react.Fragment, null, /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
109
|
-
as:
|
|
110
|
-
xcss: styles.separator
|
|
112
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'li',
|
|
113
|
+
xcss: styles.separator,
|
|
114
|
+
"aria-hidden": isSelectorListMarkupFixEnabled ? true : undefined
|
|
111
115
|
}), /*#__PURE__*/React.createElement(Reveal, null, /*#__PURE__*/React.createElement(_ShowMore.ShowMore, {
|
|
112
116
|
key: "more",
|
|
113
117
|
onClick: onMoreClick
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
3
3
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
4
4
|
const packageName = "@atlaskit/reactions";
|
|
5
|
-
const packageVersion = "35.6.
|
|
5
|
+
const packageVersion = "35.6.5";
|
|
6
6
|
/**
|
|
7
7
|
* TODO: move to utility package?
|
|
8
8
|
* A random sampling function
|
|
@@ -29,7 +29,7 @@ const Reveal = ({
|
|
|
29
29
|
testId
|
|
30
30
|
}) => {
|
|
31
31
|
return /*#__PURE__*/React.createElement(Box, {
|
|
32
|
-
as:
|
|
32
|
+
as: expValEquals('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true) ? undefined : 'li',
|
|
33
33
|
xcss: styles.emojiContainer
|
|
34
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
"data-testid": testId,
|
|
@@ -89,13 +89,17 @@ export const Selector = ({
|
|
|
89
89
|
xcss: hoverableReactionPickerSelector ? styles.hoverableReactionPickerSelectorContainer : styles.container
|
|
90
90
|
}, quickReactionEmojiIds.map(renderEmoji)));
|
|
91
91
|
}
|
|
92
|
+
const isSelectorListMarkupFixEnabled = expValEquals('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true);
|
|
92
93
|
return /*#__PURE__*/React.createElement(Inline, {
|
|
93
94
|
alignBlock: "center",
|
|
94
95
|
xcss: styles.container,
|
|
95
|
-
as:
|
|
96
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'ul',
|
|
97
|
+
role: isSelectorListMarkupFixEnabled ? 'group' : undefined,
|
|
98
|
+
"aria-label": isSelectorListMarkupFixEnabled ? messages.popperWrapperLabel.defaultMessage : undefined
|
|
96
99
|
}, quickReactionEmojiIds.map(renderEmoji), showMore ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
97
|
-
as:
|
|
98
|
-
xcss: styles.separator
|
|
100
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'li',
|
|
101
|
+
xcss: styles.separator,
|
|
102
|
+
"aria-hidden": isSelectorListMarkupFixEnabled ? true : undefined
|
|
99
103
|
}), /*#__PURE__*/React.createElement(Reveal, null, /*#__PURE__*/React.createElement(ShowMore, {
|
|
100
104
|
key: "more",
|
|
101
105
|
onClick: onMoreClick
|
|
@@ -5,7 +5,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
5
5
|
import { createAndFireEvent } from '@atlaskit/analytics-next';
|
|
6
6
|
import { UI_EVENT_TYPE, OPERATIONAL_EVENT_TYPE } from '@atlaskit/analytics-gas-types';
|
|
7
7
|
var packageName = "@atlaskit/reactions";
|
|
8
|
-
var packageVersion = "35.6.
|
|
8
|
+
var packageVersion = "35.6.5";
|
|
9
9
|
/**
|
|
10
10
|
* TODO: move to utility package?
|
|
11
11
|
* A random sampling function
|
|
@@ -29,7 +29,7 @@ var Reveal = function Reveal(_ref) {
|
|
|
29
29
|
var children = _ref.children,
|
|
30
30
|
testId = _ref.testId;
|
|
31
31
|
return /*#__PURE__*/React.createElement(Box, {
|
|
32
|
-
as:
|
|
32
|
+
as: expValEquals('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true) ? undefined : 'li',
|
|
33
33
|
xcss: styles.emojiContainer
|
|
34
34
|
}, /*#__PURE__*/React.createElement("div", {
|
|
35
35
|
"data-testid": testId,
|
|
@@ -92,13 +92,17 @@ export var Selector = function Selector(_ref2) {
|
|
|
92
92
|
xcss: hoverableReactionPickerSelector ? styles.hoverableReactionPickerSelectorContainer : styles.container
|
|
93
93
|
}, quickReactionEmojiIds.map(renderEmoji)));
|
|
94
94
|
}
|
|
95
|
+
var isSelectorListMarkupFixEnabled = expValEquals('platform_a11y_fixes_reactions_selector_list', 'isEnabled', true);
|
|
95
96
|
return /*#__PURE__*/React.createElement(Inline, {
|
|
96
97
|
alignBlock: "center",
|
|
97
98
|
xcss: styles.container,
|
|
98
|
-
as:
|
|
99
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'ul',
|
|
100
|
+
role: isSelectorListMarkupFixEnabled ? 'group' : undefined,
|
|
101
|
+
"aria-label": isSelectorListMarkupFixEnabled ? messages.popperWrapperLabel.defaultMessage : undefined
|
|
99
102
|
}, quickReactionEmojiIds.map(renderEmoji), showMore ? /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Box, {
|
|
100
|
-
as:
|
|
101
|
-
xcss: styles.separator
|
|
103
|
+
as: isSelectorListMarkupFixEnabled ? undefined : 'li',
|
|
104
|
+
xcss: styles.separator,
|
|
105
|
+
"aria-hidden": isSelectorListMarkupFixEnabled ? true : undefined
|
|
102
106
|
}), /*#__PURE__*/React.createElement(Reveal, null, /*#__PURE__*/React.createElement(ShowMore, {
|
|
103
107
|
key: "more",
|
|
104
108
|
onClick: onMoreClick
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/reactions",
|
|
3
|
-
"version": "35.6.
|
|
3
|
+
"version": "35.6.6",
|
|
4
4
|
"description": "Reactions component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"@atlaskit/spinner": "^20.1.0",
|
|
55
55
|
"@atlaskit/tabs": "^20.1.0",
|
|
56
56
|
"@atlaskit/theme": "^26.1.0",
|
|
57
|
-
"@atlaskit/tmp-editor-statsig": "^125.
|
|
57
|
+
"@atlaskit/tmp-editor-statsig": "^125.1.0",
|
|
58
58
|
"@atlaskit/tokens": "^15.8.0",
|
|
59
59
|
"@atlaskit/tooltip": "^23.1.0",
|
|
60
60
|
"@atlaskit/ufo": "^1.0.0",
|