@atlaskit/reactions 35.6.7 → 35.7.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 CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/reactions
2
2
 
3
+ ## 35.7.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`9b741c5c274ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9b741c5c274ba) -
8
+ A11Y: Expose the reactions picker panel as a non-modal dialog (role="dialog", aria-modal="false")
9
+ for screen reader users, behind the `platform_ceps-5921-a11y-fix-reactions` feature gate.
10
+
11
+ ## 35.6.8
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 35.6.7
4
18
 
5
19
  ### 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.6";
14
+ var packageVersion = "35.6.8";
15
15
  /**
16
16
  * TODO: move to utility package?
17
17
  * A random sampling function
@@ -372,6 +372,11 @@ var PopperWrapper = exports.PopperWrapper = function PopperWrapper(props) {
372
372
  setPopupRef = _useState12[1];
373
373
  var _useIntl = (0, _reactIntl.useIntl)(),
374
374
  formatMessage = _useIntl.formatMessage;
375
+ /**
376
+ * Expose the reaction picker panel as a non-modal dialog to assistive technology.
377
+ * When disabled, fall back to the previous `role="group"` semantics.
378
+ */
379
+ var isDialogRoleEnabled = (0, _platformFeatureFlags.fg)('platform_ceps-5921-a11y-fix-reactions');
375
380
  /**
376
381
  * add focus lock to popup
377
382
  */
@@ -399,7 +404,8 @@ var PopperWrapper = exports.PopperWrapper = function PopperWrapper(props) {
399
404
  style = _ref3.style,
400
405
  update = _ref3.update;
401
406
  return /*#__PURE__*/_react.default.createElement("div", {
402
- role: "group",
407
+ role: isDialogRoleEnabled ? 'dialog' : 'group',
408
+ "aria-modal": isDialogRoleEnabled ? false : undefined,
403
409
  "aria-label": formatMessage(_i18n.messages.popperWrapperLabel),
404
410
  id: PICKER_CONTROL_ID,
405
411
  "data-testid": RENDER_REACTIONPICKERPANEL_TESTID,
@@ -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.6";
5
+ const packageVersion = "35.6.8";
6
6
  /**
7
7
  * TODO: move to utility package?
8
8
  * A random sampling function
@@ -328,6 +328,11 @@ export const PopperWrapper = props => {
328
328
  const {
329
329
  formatMessage
330
330
  } = useIntl();
331
+ /**
332
+ * Expose the reaction picker panel as a non-modal dialog to assistive technology.
333
+ * When disabled, fall back to the previous `role="group"` semantics.
334
+ */
335
+ const isDialogRoleEnabled = fg('platform_ceps-5921-a11y-fix-reactions');
331
336
  /**
332
337
  * add focus lock to popup
333
338
  */
@@ -354,7 +359,8 @@ export const PopperWrapper = props => {
354
359
  update
355
360
  }) => {
356
361
  return /*#__PURE__*/React.createElement("div", {
357
- role: "group",
362
+ role: isDialogRoleEnabled ? 'dialog' : 'group',
363
+ "aria-modal": isDialogRoleEnabled ? false : undefined,
358
364
  "aria-label": formatMessage(messages.popperWrapperLabel),
359
365
  id: PICKER_CONTROL_ID,
360
366
  "data-testid": RENDER_REACTIONPICKERPANEL_TESTID,
@@ -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.6";
8
+ var packageVersion = "35.6.8";
9
9
  /**
10
10
  * TODO: move to utility package?
11
11
  * A random sampling function
@@ -363,6 +363,11 @@ export var PopperWrapper = function PopperWrapper(props) {
363
363
  setPopupRef = _useState12[1];
364
364
  var _useIntl = useIntl(),
365
365
  formatMessage = _useIntl.formatMessage;
366
+ /**
367
+ * Expose the reaction picker panel as a non-modal dialog to assistive technology.
368
+ * When disabled, fall back to the previous `role="group"` semantics.
369
+ */
370
+ var isDialogRoleEnabled = fg('platform_ceps-5921-a11y-fix-reactions');
366
371
  /**
367
372
  * add focus lock to popup
368
373
  */
@@ -390,7 +395,8 @@ export var PopperWrapper = function PopperWrapper(props) {
390
395
  style = _ref3.style,
391
396
  update = _ref3.update;
392
397
  return /*#__PURE__*/React.createElement("div", {
393
- role: "group",
398
+ role: isDialogRoleEnabled ? 'dialog' : 'group',
399
+ "aria-modal": isDialogRoleEnabled ? false : undefined,
394
400
  "aria-label": formatMessage(messages.popperWrapperLabel),
395
401
  id: PICKER_CONTROL_ID,
396
402
  "data-testid": RENDER_REACTIONPICKERPANEL_TESTID,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/reactions",
3
- "version": "35.6.7",
3
+ "version": "35.7.0",
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.2.0",
57
+ "@atlaskit/tmp-editor-statsig": "^126.1.0",
58
58
  "@atlaskit/tokens": "^15.8.0",
59
59
  "@atlaskit/tooltip": "^23.1.0",
60
60
  "@atlaskit/ufo": "^1.0.0",
@@ -131,6 +131,9 @@
131
131
  "platform_suppression_removal_fix_reactions": {
132
132
  "type": "boolean"
133
133
  },
134
+ "platform_ceps-5921-a11y-fix-reactions": {
135
+ "type": "boolean"
136
+ },
134
137
  "platform_reactions_view_more_styling_fix": {
135
138
  "type": "boolean"
136
139
  },