@instructure/ui-a11y-utils 8.17.1-snapshot.82 → 8.18.1-snapshot.1

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
@@ -3,6 +3,10 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [8.18.0](https://github.com/instructure/instructure-ui/compare/v8.17.0...v8.18.0) (2022-02-23)
7
+
8
+ **Note:** Version bump only for package @instructure/ui-a11y-utils
9
+
6
10
  # [8.17.0](https://github.com/instructure/instructure-ui/compare/v8.16.0...v8.17.0) (2022-02-07)
7
11
 
8
12
  ### Bug Fixes
package/es/FocusRegion.js CHANGED
@@ -40,7 +40,9 @@ class FocusRegion {
40
40
  this._active = false;
41
41
 
42
42
  this.handleDismiss = (event, documentClick) => {
43
- this._options.onDismiss?.(event, documentClick);
43
+ var _this$_options$onDism, _this$_options;
44
+
45
+ (_this$_options$onDism = (_this$_options = this._options).onDismiss) === null || _this$_options$onDism === void 0 ? void 0 : _this$_options$onDism.call(_this$_options, event, documentClick);
44
46
  };
45
47
 
46
48
  this.captureDocumentClick = event => {
@@ -81,13 +81,17 @@ class KeyboardFocusRegion {
81
81
 
82
82
  this.handleFirstTabbableKeyDown = event => {
83
83
  if (event.keyCode === keycode.codes.tab && event.shiftKey) {
84
- this._options.onBlur?.(event);
84
+ var _this$_options$onBlur, _this$_options;
85
+
86
+ (_this$_options$onBlur = (_this$_options = this._options).onBlur) === null || _this$_options$onBlur === void 0 ? void 0 : _this$_options$onBlur.call(_this$_options, event);
85
87
  }
86
88
  };
87
89
 
88
90
  this.handleLastTabbableKeyDown = event => {
89
91
  if (event.keyCode === keycode.codes.tab && !event.shiftKey) {
90
- this._options.onBlur?.(event);
92
+ var _this$_options$onBlur2, _this$_options2;
93
+
94
+ (_this$_options$onBlur2 = (_this$_options2 = this._options).onBlur) === null || _this$_options$onBlur2 === void 0 ? void 0 : _this$_options$onBlur2.call(_this$_options2, event);
91
95
  }
92
96
  };
93
97
 
@@ -95,7 +95,9 @@ class ScreenReaderFocusRegion {
95
95
 
96
96
  hideNodes(nodes) {
97
97
  nodes.forEach(node => {
98
- const ariaLive = typeof node.getAttribute === 'function' && node.getAttribute('aria-live')?.toLowerCase();
98
+ var _node$getAttribute;
99
+
100
+ const ariaLive = typeof node.getAttribute === 'function' && ((_node$getAttribute = node.getAttribute('aria-live')) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.toLowerCase());
99
101
 
100
102
  if (node && node.nodeType === 1 && node.tagName.toLowerCase() !== 'script' && ariaLive !== 'assertive' && ariaLive !== 'polite' && this._parents.indexOf(node) === -1 && this._nodes.indexOf(node) === -1 && this._liveRegion.indexOf(node) === -1 && !this._contextElement.contains(node)) {
101
103
  if (node.tagName.toLowerCase() !== 'iframe') {
@@ -60,7 +60,9 @@ class FocusRegion {
60
60
  this._active = false;
61
61
 
62
62
  this.handleDismiss = (event, documentClick) => {
63
- this._options.onDismiss?.(event, documentClick);
63
+ var _this$_options$onDism, _this$_options;
64
+
65
+ (_this$_options$onDism = (_this$_options = this._options).onDismiss) === null || _this$_options$onDism === void 0 ? void 0 : _this$_options$onDism.call(_this$_options, event, documentClick);
64
66
  };
65
67
 
66
68
  this.captureDocumentClick = event => {
@@ -109,13 +109,17 @@ class KeyboardFocusRegion {
109
109
 
110
110
  this.handleFirstTabbableKeyDown = event => {
111
111
  if (event.keyCode === _keycode.default.codes.tab && event.shiftKey) {
112
- this._options.onBlur?.(event);
112
+ var _this$_options$onBlur, _this$_options;
113
+
114
+ (_this$_options$onBlur = (_this$_options = this._options).onBlur) === null || _this$_options$onBlur === void 0 ? void 0 : _this$_options$onBlur.call(_this$_options, event);
113
115
  }
114
116
  };
115
117
 
116
118
  this.handleLastTabbableKeyDown = event => {
117
119
  if (event.keyCode === _keycode.default.codes.tab && !event.shiftKey) {
118
- this._options.onBlur?.(event);
120
+ var _this$_options$onBlur2, _this$_options2;
121
+
122
+ (_this$_options$onBlur2 = (_this$_options2 = this._options).onBlur) === null || _this$_options$onBlur2 === void 0 ? void 0 : _this$_options$onBlur2.call(_this$_options2, event);
119
123
  }
120
124
  };
121
125
 
@@ -102,7 +102,9 @@ class ScreenReaderFocusRegion {
102
102
 
103
103
  hideNodes(nodes) {
104
104
  nodes.forEach(node => {
105
- const ariaLive = typeof node.getAttribute === 'function' && node.getAttribute('aria-live')?.toLowerCase();
105
+ var _node$getAttribute;
106
+
107
+ const ariaLive = typeof node.getAttribute === 'function' && ((_node$getAttribute = node.getAttribute('aria-live')) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.toLowerCase());
106
108
 
107
109
  if (node && node.nodeType === 1 && node.tagName.toLowerCase() !== 'script' && ariaLive !== 'assertive' && ariaLive !== 'polite' && this._parents.indexOf(node) === -1 && this._nodes.indexOf(node) === -1 && this._liveRegion.indexOf(node) === -1 && !this._contextElement.contains(node)) {
108
110
  if (node.tagName.toLowerCase() !== 'iframe') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-a11y-utils",
3
- "version": "8.17.1-snapshot.82+96244a097",
3
+ "version": "8.18.1-snapshot.1+669aa5892",
4
4
  "description": "A collection of utilities for managing focus and screen reader behavior",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,19 +23,19 @@
23
23
  "license": "MIT",
24
24
  "dependencies": {
25
25
  "@babel/runtime": "^7.13.10",
26
- "@instructure/console": "8.17.1-snapshot.82+96244a097",
27
- "@instructure/ui-a11y-content": "8.17.1-snapshot.82+96244a097",
28
- "@instructure/ui-dom-utils": "8.17.1-snapshot.82+96244a097",
29
- "@instructure/ui-react-utils": "8.17.1-snapshot.82+96244a097",
30
- "@instructure/ui-testable": "8.17.1-snapshot.82+96244a097",
31
- "@instructure/uid": "8.17.1-snapshot.82+96244a097",
26
+ "@instructure/console": "8.18.1-snapshot.1+669aa5892",
27
+ "@instructure/ui-a11y-content": "8.18.1-snapshot.1+669aa5892",
28
+ "@instructure/ui-dom-utils": "8.18.1-snapshot.1+669aa5892",
29
+ "@instructure/ui-react-utils": "8.18.1-snapshot.1+669aa5892",
30
+ "@instructure/ui-testable": "8.18.1-snapshot.1+669aa5892",
31
+ "@instructure/uid": "8.18.1-snapshot.1+669aa5892",
32
32
  "keycode": "^2",
33
33
  "prop-types": "^15"
34
34
  },
35
35
  "devDependencies": {
36
- "@instructure/ui-babel-preset": "8.17.1-snapshot.82+96244a097",
37
- "@instructure/ui-color-utils": "8.17.1-snapshot.82+96244a097",
38
- "@instructure/ui-test-utils": "8.17.1-snapshot.82+96244a097"
36
+ "@instructure/ui-babel-preset": "8.18.1-snapshot.1+669aa5892",
37
+ "@instructure/ui-color-utils": "8.18.1-snapshot.1+669aa5892",
38
+ "@instructure/ui-test-utils": "8.18.1-snapshot.1+669aa5892"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "react": ">=16.8 <=17"
@@ -44,5 +44,5 @@
44
44
  "access": "public"
45
45
  },
46
46
  "sideEffects": false,
47
- "gitHead": "96244a097dffef5f10bbe7979c580581c787083e"
47
+ "gitHead": "669aa58926b123028bcb9e39427d36910b78b0d1"
48
48
  }