@atlaskit/editor-plugin-type-ahead 6.1.0 → 6.2.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,23 @@
1
1
  # @atlaskit/editor-plugin-type-ahead
2
2
 
3
+ ## 6.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`97586ad447624`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/97586ad447624) -
8
+ [ux] Add a feature gate to remove the onClick handler from type-ahead InpuQuery to fix the a11y
9
+ violation
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 6.1.1
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 6.1.0
4
22
 
5
23
  ### Minor Changes
@@ -245,6 +245,8 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
245
245
  return false;
246
246
  }
247
247
  }, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state, isEditorControlsEnabled]);
248
+
249
+ // Remove when cleaning up platform_editor_a11y_remove_input_query_on_click
248
250
  var onClick = (0, _react.useCallback)(function (event) {
249
251
  var _inputRef$current;
250
252
  event.stopPropagation();
@@ -476,18 +478,13 @@ var InputQuery = exports.InputQuery = /*#__PURE__*/_react.default.memo(function
476
478
  }, [showPlaceholder, selection]);
477
479
  var assistiveHintID = _constants.TYPE_AHEAD_DECORATION_ELEMENT_ID + '__assistiveHint';
478
480
  var intl = (0, _reactIntlNext.useIntl)();
479
-
480
- /**
481
- When we migrated to emotion from styled component, we started getting this error.
482
- jsx-a11y/interactive-supports-focus
483
- Task added in https://product-fabric.atlassian.net/wiki/spaces/E/pages/3182068181/Potential+improvements#Moderate-changes.
484
- */
485
481
  return (0, _react2.jsx)(_react.Fragment, null, triggerQueryPrefix, (0, _react2.jsx)("span", {
486
482
  css: [querySpanStyles, isSearchPlaceholderEnabled && queryWithoutPlaceholderStyles, showPlaceholder && placeholderStyles],
487
483
  contentEditable: true,
488
484
  ref: ref,
489
485
  onKeyUp: onKeyUp,
490
- onClick: onClick,
486
+ onClick: (0, _platformFeatureFlags.fg)('platform_editor_a11y_remove_input_query_on_click') ? undefined : onClick,
487
+ tabIndex: (0, _platformFeatureFlags.fg)('platform_editor_a11y_remove_input_query_on_click') ? -1 : undefined,
491
488
  onInput: isSearchPlaceholderEnabled ? onInput : undefined,
492
489
  role: "combobox",
493
490
  "aria-controls": _constants.TYPE_AHEAD_DECORATION_ELEMENT_ID,
@@ -337,7 +337,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
337
337
  }
338
338
  }, (0, _react2.jsx)("div", {
339
339
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
340
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
340
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
341
341
  ,
342
342
  tabIndex: 0
343
343
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -311,7 +311,7 @@ var TypeAheadPopup = exports.TypeAheadPopup = /*#__PURE__*/_react.default.memo(f
311
311
  preventOverflow: true
312
312
  }, (0, _react2.jsx)("div", {
313
313
  css: [typeAheadContent]
314
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
314
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
315
315
  ,
316
316
  tabIndex: 0
317
317
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -229,6 +229,8 @@ export const InputQuery = /*#__PURE__*/React.memo(({
229
229
  return false;
230
230
  }
231
231
  }, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state, isEditorControlsEnabled]);
232
+
233
+ // Remove when cleaning up platform_editor_a11y_remove_input_query_on_click
232
234
  const onClick = useCallback(event => {
233
235
  var _inputRef$current;
234
236
  event.stopPropagation();
@@ -469,18 +471,13 @@ export const InputQuery = /*#__PURE__*/React.memo(({
469
471
  }, [showPlaceholder, selection]);
470
472
  const assistiveHintID = TYPE_AHEAD_DECORATION_ELEMENT_ID + '__assistiveHint';
471
473
  const intl = useIntl();
472
-
473
- /**
474
- When we migrated to emotion from styled component, we started getting this error.
475
- jsx-a11y/interactive-supports-focus
476
- Task added in https://product-fabric.atlassian.net/wiki/spaces/E/pages/3182068181/Potential+improvements#Moderate-changes.
477
- */
478
474
  return jsx(Fragment, null, triggerQueryPrefix, jsx("span", {
479
475
  css: [querySpanStyles, isSearchPlaceholderEnabled && queryWithoutPlaceholderStyles, showPlaceholder && placeholderStyles],
480
476
  contentEditable: true,
481
477
  ref: ref,
482
478
  onKeyUp: onKeyUp,
483
- onClick: onClick,
479
+ onClick: fg('platform_editor_a11y_remove_input_query_on_click') ? undefined : onClick,
480
+ tabIndex: fg('platform_editor_a11y_remove_input_query_on_click') ? -1 : undefined,
484
481
  onInput: isSearchPlaceholderEnabled ? onInput : undefined,
485
482
  role: "combobox",
486
483
  "aria-controls": TYPE_AHEAD_DECORATION_ELEMENT_ID,
@@ -333,7 +333,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
333
333
  }
334
334
  }, jsx("div", {
335
335
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
336
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
336
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
337
337
  ,
338
338
  tabIndex: 0
339
339
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -305,7 +305,7 @@ export const TypeAheadPopup = /*#__PURE__*/React.memo(props => {
305
305
  preventOverflow: true
306
306
  }, jsx("div", {
307
307
  css: [typeAheadContent]
308
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
308
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
309
309
  ,
310
310
  tabIndex: 0
311
311
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -235,6 +235,8 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
235
235
  return false;
236
236
  }
237
237
  }, [onUndoRedo, onItemSelect, selectNextItem, selectPreviousItem, cancel, cleanedInputContent, editorView.state, isEditorControlsEnabled]);
238
+
239
+ // Remove when cleaning up platform_editor_a11y_remove_input_query_on_click
238
240
  var onClick = useCallback(function (event) {
239
241
  var _inputRef$current;
240
242
  event.stopPropagation();
@@ -466,18 +468,13 @@ export var InputQuery = /*#__PURE__*/React.memo(function (_ref) {
466
468
  }, [showPlaceholder, selection]);
467
469
  var assistiveHintID = TYPE_AHEAD_DECORATION_ELEMENT_ID + '__assistiveHint';
468
470
  var intl = useIntl();
469
-
470
- /**
471
- When we migrated to emotion from styled component, we started getting this error.
472
- jsx-a11y/interactive-supports-focus
473
- Task added in https://product-fabric.atlassian.net/wiki/spaces/E/pages/3182068181/Potential+improvements#Moderate-changes.
474
- */
475
471
  return jsx(Fragment, null, triggerQueryPrefix, jsx("span", {
476
472
  css: [querySpanStyles, isSearchPlaceholderEnabled && queryWithoutPlaceholderStyles, showPlaceholder && placeholderStyles],
477
473
  contentEditable: true,
478
474
  ref: ref,
479
475
  onKeyUp: onKeyUp,
480
- onClick: onClick,
476
+ onClick: fg('platform_editor_a11y_remove_input_query_on_click') ? undefined : onClick,
477
+ tabIndex: fg('platform_editor_a11y_remove_input_query_on_click') ? -1 : undefined,
481
478
  onInput: isSearchPlaceholderEnabled ? onInput : undefined,
482
479
  role: "combobox",
483
480
  "aria-controls": TYPE_AHEAD_DECORATION_ELEMENT_ID,
@@ -327,7 +327,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
327
327
  }
328
328
  }, jsx("div", {
329
329
  css: [typeAheadContent, moreElementsInQuickInsertViewEnabled && typeAheadContentOverride, showMoreOptionsButton && typeAheadWrapperWithViewMoreOverride]
330
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
330
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
331
331
  ,
332
332
  tabIndex: 0
333
333
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
@@ -302,7 +302,7 @@ export var TypeAheadPopup = /*#__PURE__*/React.memo(function (props) {
302
302
  preventOverflow: true
303
303
  }, jsx("div", {
304
304
  css: [typeAheadContent]
305
- // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex
305
+ // eslint-disable-next-line jsx-a11y/no-noninteractive-tabindex, @atlassian/a11y/no-noninteractive-tabindex
306
306
  ,
307
307
  tabIndex: 0
308
308
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop -- Ignored via go/DSP-18766
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-type-ahead",
3
- "version": "6.1.0",
3
+ "version": "6.2.0",
4
4
  "description": "Type-ahead plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "dependencies": {
32
32
  "@atlaskit/adf-schema": "^51.2.0",
33
33
  "@atlaskit/editor-element-browser": "^4.0.0",
34
- "@atlaskit/editor-plugin-analytics": "^6.0.0",
34
+ "@atlaskit/editor-plugin-analytics": "^6.1.0",
35
35
  "@atlaskit/editor-plugin-connectivity": "^6.0.0",
36
36
  "@atlaskit/editor-plugin-context-panel": "^8.0.0",
37
37
  "@atlaskit/editor-plugin-metrics": "^7.0.0",
@@ -45,7 +45,7 @@
45
45
  "@atlaskit/primitives": "^14.15.0",
46
46
  "@atlaskit/prosemirror-input-rules": "^3.4.0",
47
47
  "@atlaskit/theme": "^21.0.0",
48
- "@atlaskit/tmp-editor-statsig": "^12.32.0",
48
+ "@atlaskit/tmp-editor-statsig": "^13.2.0",
49
49
  "@atlaskit/tokens": "^6.4.0",
50
50
  "@babel/runtime": "^7.0.0",
51
51
  "@emotion/react": "^11.7.1",
@@ -56,7 +56,7 @@
56
56
  "w3c-keyname": "^2.1.8"
57
57
  },
58
58
  "peerDependencies": {
59
- "@atlaskit/editor-common": "^110.2.0",
59
+ "@atlaskit/editor-common": "^110.4.0",
60
60
  "react": "^18.2.0",
61
61
  "react-dom": "^18.2.0",
62
62
  "react-intl-next": "npm:react-intl@^5.18.1"
@@ -108,6 +108,9 @@
108
108
  },
109
109
  "platform_editor_ai_rovo_rebrand": {
110
110
  "type": "boolean"
111
+ },
112
+ "platform_editor_a11y_remove_input_query_on_click": {
113
+ "type": "boolean"
111
114
  }
112
115
  }
113
116
  }