@atlaskit/editor-common 103.9.1 → 103.9.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,23 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 103.9.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#138479](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/138479)
8
+ [`058e8050f1a78`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/058e8050f1a78) -
9
+ [A11Y-9995] Popup aria label removed fallback and added aria label where it fits in places that
10
+ uses the component
11
+
12
+ ## 103.9.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#139698](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/139698)
17
+ [`cf8ea53ed0264`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/cf8ea53ed0264) -
18
+ Clean-up nested expand feature gate
19
+ - Updated dependencies
20
+
3
21
  ## 103.9.1
4
22
 
5
23
  ### Patch Changes
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "103.9.1";
20
+ var packageVersion = "103.9.3";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // Ignored via go/ees007
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "103.9.1";
26
+ var packageVersion = "103.9.3";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -16,6 +16,7 @@ var _focusTrap = _interopRequireDefault(require("focus-trap"));
16
16
  var _rafSchd = _interopRequireDefault(require("raf-schd"));
17
17
  var _reactDom = require("react-dom");
18
18
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
19
+ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
19
20
  var _utils = require("./utils");
20
21
  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; }
21
22
  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; }
@@ -293,14 +294,19 @@ var Popup = exports.default = /*#__PURE__*/function (_React$Component) {
293
294
  }, {
294
295
  key: "renderPopup",
295
296
  value: function renderPopup() {
297
+ var _this$props$ariaLabel;
296
298
  var position = this.state.position;
297
299
  var shouldRenderPopup = this.props.shouldRenderPopup;
298
300
  if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
299
301
  return null;
300
302
  }
301
303
 
302
- //In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
303
- var ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
304
+ /**
305
+ * https://a11y.atlassian.net/browse/A11Y-9995
306
+ * We set aria-label to undefined if it's null, no more 'Popup' fallback.
307
+ * It is meaningless for screen readers and causes confusion.
308
+ */
309
+ var ariaLabel = (0, _platformFeatureFlags.fg)('editor_a11y_aria_label_removal_popup') ? (_this$props$ariaLabel = this.props.ariaLabel) !== null && _this$props$ariaLabel !== void 0 ? _this$props$ariaLabel : undefined : this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
304
310
  return /*#__PURE__*/_react.default.createElement("div", {
305
311
  ref: this.handleRef,
306
312
  style: _objectSpread(_objectSpread({
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "103.9.1";
4
+ const packageVersion = "103.9.3";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "103.9.1";
16
+ const packageVersion = "103.9.3";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -4,6 +4,7 @@ import createFocusTrap from 'focus-trap';
4
4
  import rafSchedule from 'raf-schd';
5
5
  import { createPortal, flushSync } from 'react-dom';
6
6
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
7
+ import { fg } from '@atlaskit/platform-feature-flags';
7
8
  import { calculatePlacement, calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
8
9
  // Ignored via go/ees005
9
10
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -254,6 +255,7 @@ export default class Popup extends React.Component {
254
255
  }
255
256
  }
256
257
  renderPopup() {
258
+ var _this$props$ariaLabel;
257
259
  const {
258
260
  position
259
261
  } = this.state;
@@ -264,8 +266,12 @@ export default class Popup extends React.Component {
264
266
  return null;
265
267
  }
266
268
 
267
- //In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
268
- const ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
269
+ /**
270
+ * https://a11y.atlassian.net/browse/A11Y-9995
271
+ * We set aria-label to undefined if it's null, no more 'Popup' fallback.
272
+ * It is meaningless for screen readers and causes confusion.
273
+ */
274
+ const ariaLabel = fg('editor_a11y_aria_label_removal_popup') ? (_this$props$ariaLabel = this.props.ariaLabel) !== null && _this$props$ariaLabel !== void 0 ? _this$props$ariaLabel : undefined : this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
269
275
  return /*#__PURE__*/React.createElement("div", {
270
276
  ref: this.handleRef,
271
277
  style: {
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "103.9.1";
10
+ var packageVersion = "103.9.3";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "103.9.1";
23
+ var packageVersion = "103.9.3";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -13,6 +13,7 @@ import createFocusTrap from 'focus-trap';
13
13
  import rafSchedule from 'raf-schd';
14
14
  import { createPortal, flushSync } from 'react-dom';
15
15
  import { akEditorFloatingPanelZIndex } from '@atlaskit/editor-shared-styles';
16
+ import { fg } from '@atlaskit/platform-feature-flags';
16
17
  import { calculatePlacement, calculatePosition as _calculatePosition, findOverflowScrollParent, validatePosition } from './utils';
17
18
  // Ignored via go/ees005
18
19
  // eslint-disable-next-line @repo/internal/react/no-class-components
@@ -286,14 +287,19 @@ var Popup = /*#__PURE__*/function (_React$Component) {
286
287
  }, {
287
288
  key: "renderPopup",
288
289
  value: function renderPopup() {
290
+ var _this$props$ariaLabel;
289
291
  var position = this.state.position;
290
292
  var shouldRenderPopup = this.props.shouldRenderPopup;
291
293
  if (shouldRenderPopup && !shouldRenderPopup(position || {})) {
292
294
  return null;
293
295
  }
294
296
 
295
- //In some cases we don't want to use default "Popup" text as an aria-label. It might be tedious for screen reader users.
296
- var ariaLabel = this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
297
+ /**
298
+ * https://a11y.atlassian.net/browse/A11Y-9995
299
+ * We set aria-label to undefined if it's null, no more 'Popup' fallback.
300
+ * It is meaningless for screen readers and causes confusion.
301
+ */
302
+ var ariaLabel = fg('editor_a11y_aria_label_removal_popup') ? (_this$props$ariaLabel = this.props.ariaLabel) !== null && _this$props$ariaLabel !== void 0 ? _this$props$ariaLabel : undefined : this.props.ariaLabel === null ? undefined : this.props.ariaLabel || 'Popup';
297
303
  return /*#__PURE__*/React.createElement("div", {
298
304
  ref: this.handleRef,
299
305
  style: _objectSpread(_objectSpread({
@@ -240,14 +240,6 @@ export type FeatureFlags = {
240
240
 
241
241
  */
242
242
  moreElementsInQuickInsertView?: boolean;
243
- /**
244
- * @description
245
- * Enables nesting nested expands in expands
246
- *
247
- * @see https://hello.jira.atlassian.cloud/browse/FD-72082
248
- * @default false
249
- */
250
- nestedExpandInExpandEx?: boolean;
251
243
  /**
252
244
  * @description
253
245
  * Used by the legacy content macro to disable render tracking due to excessive logs.
@@ -240,14 +240,6 @@ export type FeatureFlags = {
240
240
 
241
241
  */
242
242
  moreElementsInQuickInsertView?: boolean;
243
- /**
244
- * @description
245
- * Enables nesting nested expands in expands
246
- *
247
- * @see https://hello.jira.atlassian.cloud/browse/FD-72082
248
- * @default false
249
- */
250
- nestedExpandInExpandEx?: boolean;
251
243
  /**
252
244
  * @description
253
245
  * Used by the legacy content macro to disable render tracking due to excessive logs.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "103.9.1",
3
+ "version": "103.9.3",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -154,14 +154,14 @@
154
154
  "@atlaskit/platform-feature-flags": "^1.1.0",
155
155
  "@atlaskit/popper": "^7.0.0",
156
156
  "@atlaskit/primitives": "^14.4.0",
157
- "@atlaskit/profilecard": "^23.7.0",
157
+ "@atlaskit/profilecard": "^23.8.0",
158
158
  "@atlaskit/section-message": "^8.2.0",
159
159
  "@atlaskit/smart-card": "^36.8.0",
160
160
  "@atlaskit/smart-user-picker": "^8.0.0",
161
161
  "@atlaskit/spinner": "^18.0.0",
162
162
  "@atlaskit/task-decision": "^19.1.0",
163
163
  "@atlaskit/textfield": "^8.0.0",
164
- "@atlaskit/tmp-editor-statsig": "^4.11.0",
164
+ "@atlaskit/tmp-editor-statsig": "^4.12.0",
165
165
  "@atlaskit/tokens": "^4.8.0",
166
166
  "@atlaskit/tooltip": "^20.0.0",
167
167
  "@atlaskit/width-detector": "^5.0.0",
@@ -335,6 +335,9 @@
335
335
  "platform_editor_lcm_nested_panel_icon_fix": {
336
336
  "type": "boolean"
337
337
  },
338
+ "editor_a11y_aria_label_removal_popup": {
339
+ "type": "boolean"
340
+ },
338
341
  "platform_fix_media_image_resizing": {
339
342
  "type": "boolean"
340
343
  }