@atlaskit/editor-plugin-media 1.17.0 → 1.17.2

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,22 @@
1
1
  # @atlaskit/editor-plugin-media
2
2
 
3
+ ## 1.17.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#89395](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/89395)
8
+ [`d8ff819d271c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d8ff819d271c) -
9
+ [ux] ECA11Y-200 Make editor video seeker accessible for keyboard users
10
+
11
+ ## 1.17.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [#96237](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/96237)
16
+ [`0401e7b5a88e`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0401e7b5a88e) -
17
+ [ED-23102] Bump ADF schema to version 35.12.2
18
+ - Updated dependencies
19
+
3
20
  ## 1.17.0
4
21
 
5
22
  ### Minor Changes
@@ -899,12 +899,16 @@ var createPlugin = exports.createPlugin = function createPlugin(_schema, options
899
899
  var targetsAndButtons = {
900
900
  button: a11yDefaultKeys,
901
901
  range: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']),
902
- text: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'Esc'])
902
+ combobox: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'Esc']),
903
+ slider: ['Tab', 'Shift', 'ArrowLeft', 'ArrowRight']
903
904
  };
905
+ var targetRole = event.target.role;
904
906
  var targetType = event.target.type;
905
- // only if targeting button or range/text input
906
- if (targetType && targetType in targetsAndButtons) {
907
- var targetRelatedA11YKeys = targetsAndButtons[targetType];
907
+ var allowedTargets = targetRole || targetType;
908
+
909
+ // only if targeting interactive elements fe. button, slider, range, dropdown
910
+ if (allowedTargets && allowedTargets in targetsAndButtons) {
911
+ var targetRelatedA11YKeys = targetsAndButtons[allowedTargets];
908
912
  var allowedKeys = new Set(targetRelatedA11YKeys);
909
913
  if (allowedKeys.has(event.key) || allowedKeys.has(event.code)) {
910
914
  // allow event to bubble to be handled by react handlers
@@ -788,12 +788,16 @@ export const createPlugin = (_schema, options, reactContext, getIntl, pluginInje
788
788
  const targetsAndButtons = {
789
789
  button: a11yDefaultKeys,
790
790
  range: [...a11yDefaultKeys, 'ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight'],
791
- text: [...a11yDefaultKeys, 'ArrowDown', 'ArrowUp', 'Esc']
791
+ combobox: [...a11yDefaultKeys, 'ArrowDown', 'ArrowUp', 'Esc'],
792
+ slider: ['Tab', 'Shift', 'ArrowLeft', 'ArrowRight']
792
793
  };
794
+ const targetRole = event.target.role;
793
795
  const targetType = event.target.type;
794
- // only if targeting button or range/text input
795
- if (targetType && targetType in targetsAndButtons) {
796
- let targetRelatedA11YKeys = targetsAndButtons[targetType];
796
+ const allowedTargets = targetRole || targetType;
797
+
798
+ // only if targeting interactive elements fe. button, slider, range, dropdown
799
+ if (allowedTargets && allowedTargets in targetsAndButtons) {
800
+ let targetRelatedA11YKeys = targetsAndButtons[allowedTargets];
797
801
  const allowedKeys = new Set(targetRelatedA11YKeys);
798
802
  if (allowedKeys.has(event.key) || allowedKeys.has(event.code)) {
799
803
  // allow event to bubble to be handled by react handlers
@@ -884,12 +884,16 @@ export var createPlugin = function createPlugin(_schema, options, reactContext,
884
884
  var targetsAndButtons = {
885
885
  button: a11yDefaultKeys,
886
886
  range: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'ArrowLeft', 'ArrowRight']),
887
- text: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'Esc'])
887
+ combobox: [].concat(a11yDefaultKeys, ['ArrowDown', 'ArrowUp', 'Esc']),
888
+ slider: ['Tab', 'Shift', 'ArrowLeft', 'ArrowRight']
888
889
  };
890
+ var targetRole = event.target.role;
889
891
  var targetType = event.target.type;
890
- // only if targeting button or range/text input
891
- if (targetType && targetType in targetsAndButtons) {
892
- var targetRelatedA11YKeys = targetsAndButtons[targetType];
892
+ var allowedTargets = targetRole || targetType;
893
+
894
+ // only if targeting interactive elements fe. button, slider, range, dropdown
895
+ if (allowedTargets && allowedTargets in targetsAndButtons) {
896
+ var targetRelatedA11YKeys = targetsAndButtons[allowedTargets];
893
897
  var allowedKeys = new Set(targetRelatedA11YKeys);
894
898
  if (allowedKeys.has(event.key) || allowedKeys.has(event.code)) {
895
899
  // allow event to bubble to be handled by react handlers
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-media",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "Media plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -33,14 +33,14 @@
33
33
  "./types": "./src/types.ts"
34
34
  },
35
35
  "dependencies": {
36
- "@atlaskit/adf-schema": "^35.12.1",
36
+ "@atlaskit/adf-schema": "^35.12.2",
37
37
  "@atlaskit/analytics-namespaced-context": "^6.9.0",
38
38
  "@atlaskit/analytics-next": "^9.3.0",
39
39
  "@atlaskit/button": "^17.14.0",
40
40
  "@atlaskit/editor-common": "^78.37.0",
41
41
  "@atlaskit/editor-palette": "1.6.0",
42
42
  "@atlaskit/editor-plugin-analytics": "^1.1.0",
43
- "@atlaskit/editor-plugin-annotation": "1.6.2",
43
+ "@atlaskit/editor-plugin-annotation": "1.6.3",
44
44
  "@atlaskit/editor-plugin-decorations": "^1.1.0",
45
45
  "@atlaskit/editor-plugin-editor-disabled": "^1.1.0",
46
46
  "@atlaskit/editor-plugin-editor-viewmode": "^1.1.0",
@@ -58,16 +58,16 @@
58
58
  "@atlaskit/media-card": "^77.11.0",
59
59
  "@atlaskit/media-client": "^26.3.0",
60
60
  "@atlaskit/media-client-react": "^2.0.0",
61
- "@atlaskit/media-common": "^11.1.0",
61
+ "@atlaskit/media-common": "^11.2.0",
62
62
  "@atlaskit/media-filmstrip": "^47.0.0",
63
63
  "@atlaskit/media-picker": "^66.4.0",
64
64
  "@atlaskit/media-ui": "^25.9.0",
65
- "@atlaskit/media-viewer": "^48.4.0",
65
+ "@atlaskit/media-viewer": "^48.5.0",
66
66
  "@atlaskit/platform-feature-flags": "^0.2.0",
67
67
  "@atlaskit/primitives": "^5.7.0",
68
- "@atlaskit/textfield": "^6.1.0",
68
+ "@atlaskit/textfield": "^6.3.0",
69
69
  "@atlaskit/theme": "^12.7.0",
70
- "@atlaskit/tokens": "^1.44.0",
70
+ "@atlaskit/tokens": "^1.45.0",
71
71
  "@atlaskit/tooltip": "^18.3.0",
72
72
  "@babel/runtime": "^7.0.0",
73
73
  "@emotion/react": "^11.7.1",