@atlaskit/editor-plugin-help-dialog 7.2.2 → 7.2.3

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,12 @@
1
1
  # @atlaskit/editor-plugin-help-dialog
2
2
 
3
+ ## 7.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e0a94dfe793c5`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e0a94dfe793c5) -
8
+ [ux] Added missing aria label and role to modal context
9
+
3
10
  ## 7.2.2
4
11
 
5
12
  ### Patch Changes
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
7
  exports.default = exports.ModalContent = void 0;
8
- var _react = _interopRequireDefault(require("react"));
8
+ var _react = require("react");
9
9
  var _react2 = require("@emotion/react");
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _browser = require("@atlaskit/editor-common/browser");
@@ -29,11 +29,16 @@ var ModalContent = exports.ModalContent = function ModalContent(_ref) {
29
29
  var formatting = _ref.formatting,
30
30
  onClose = _ref.onClose;
31
31
  var browser = (0, _expValEquals.expValEquals)('platform_editor_hydratable_ui', 'isEnabled', true) ? (0, _browser.getBrowserInfo)() : _browser.browser;
32
- return (0, _react2.jsx)(_react.default.Fragment, null, (0, _react2.jsx)(_ModalHeader.default, {
32
+ var intl = (0, _reactIntlNext.useIntl)();
33
+ var isA11yFixEnabled = (0, _expValEquals.expValEquals)('platform_editor_a11y_eslint_fix', 'isEnabled', true);
34
+ return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)(_ModalHeader.default, {
33
35
  onClose: onClose
34
36
  }), (0, _react2.jsx)("div", {
37
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
35
38
  css: _styles.contentWrapper,
36
- tabIndex: 0
39
+ tabIndex: 0,
40
+ role: isA11yFixEnabled ? 'region' : undefined,
41
+ "aria-label": isA11yFixEnabled ? intl.formatMessage(_messages.helpDialogMessages.editorHelp) : undefined
37
42
  }, (0, _react2.jsx)("div", {
38
43
  css: _styles.line
39
44
  }), (0, _react2.jsx)("div", {
@@ -3,11 +3,11 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  /** @jsxFrag */
6
- import React from 'react';
6
+ import { Fragment } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import { FormattedMessage } from 'react-intl-next';
10
+ import { FormattedMessage, useIntl } from 'react-intl-next';
11
11
  import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import Heading from '@atlaskit/heading';
@@ -22,11 +22,16 @@ export const ModalContent = ({
22
22
  onClose
23
23
  }) => {
24
24
  const browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
25
- return jsx(React.Fragment, null, jsx(ModalHeader, {
25
+ const intl = useIntl();
26
+ const isA11yFixEnabled = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true);
27
+ return jsx(Fragment, null, jsx(ModalHeader, {
26
28
  onClose: onClose
27
29
  }), jsx("div", {
30
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
28
31
  css: contentWrapper,
29
- tabIndex: 0
32
+ tabIndex: 0,
33
+ role: isA11yFixEnabled ? 'region' : undefined,
34
+ "aria-label": isA11yFixEnabled ? intl.formatMessage(messages.editorHelp) : undefined
30
35
  }, jsx("div", {
31
36
  css: line
32
37
  }), jsx("div", {
@@ -3,11 +3,11 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  /** @jsxFrag */
6
- import React from 'react';
6
+ import { Fragment } from 'react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
9
9
  import { jsx } from '@emotion/react';
10
- import { FormattedMessage } from 'react-intl-next';
10
+ import { FormattedMessage, useIntl } from 'react-intl-next';
11
11
  import { browser as browserLegacy, getBrowserInfo } from '@atlaskit/editor-common/browser';
12
12
  import { helpDialogMessages as messages } from '@atlaskit/editor-common/messages';
13
13
  import Heading from '@atlaskit/heading';
@@ -21,11 +21,16 @@ export var ModalContent = function ModalContent(_ref) {
21
21
  var formatting = _ref.formatting,
22
22
  onClose = _ref.onClose;
23
23
  var browser = expValEquals('platform_editor_hydratable_ui', 'isEnabled', true) ? getBrowserInfo() : browserLegacy;
24
- return jsx(React.Fragment, null, jsx(ModalHeader, {
24
+ var intl = useIntl();
25
+ var isA11yFixEnabled = expValEquals('platform_editor_a11y_eslint_fix', 'isEnabled', true);
26
+ return jsx(Fragment, null, jsx(ModalHeader, {
25
27
  onClose: onClose
26
28
  }), jsx("div", {
29
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
27
30
  css: contentWrapper,
28
- tabIndex: 0
31
+ tabIndex: 0,
32
+ role: isA11yFixEnabled ? 'region' : undefined,
33
+ "aria-label": isA11yFixEnabled ? intl.formatMessage(messages.editorHelp) : undefined
29
34
  }, jsx("div", {
30
35
  css: line
31
36
  }), jsx("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-help-dialog",
3
- "version": "7.2.2",
3
+ "version": "7.2.3",
4
4
  "description": "Help Dialog plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",