@atlaskit/editor-plugin-type-ahead 6.1.1 → 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,17 @@
|
|
|
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
|
+
|
|
3
15
|
## 6.1.1
|
|
4
16
|
|
|
5
17
|
### Patch 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,
|
|
@@ -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,
|
|
@@ -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,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-type-ahead",
|
|
3
|
-
"version": "6.
|
|
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",
|
|
@@ -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": "^13.
|
|
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",
|
|
@@ -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
|
}
|