@instructure/ui-alerts 10.4.1-snapshot-5 → 10.4.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,11 +3,12 @@
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
- ## [10.4.1-snapshot-5](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1-snapshot-5) (2024-10-28)
6
+ ## [10.4.1](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1) (2024-10-28)
7
7
 
8
8
 
9
9
  ### Bug Fixes
10
10
 
11
+ * docs screenreader alerts are no longer screendeader focusable ([c225853](https://github.com/instructure/instructure-ui/commit/c2258531aa377b698fe932012112704f1879b501))
11
12
  * update license ([1c039d9](https://github.com/instructure/instructure-ui/commit/1c039d9cbf5a3ea99b59803ddde5c6c0b2d76ba5))
12
13
 
13
14
 
package/es/Alert/index.js CHANGED
@@ -109,6 +109,9 @@ let Alert = (_dec = withDeterministicId(), _dec2 = withStyle(generateStyle, gene
109
109
  error(liveRegion.getAttribute('role') === 'alert', `[Alert] live region must have role='alert' set on page load in order to announce content`);
110
110
  if (liveRegion) {
111
111
  liveRegion.setAttribute('aria-live', this.props.liveRegionPoliteness);
112
+ // indicates what notifications the user agent will trigger when the
113
+ // accessibility tree within a live region is modified.
114
+ // additions: elements are added, text: Text content is added
112
115
  liveRegion.setAttribute('aria-relevant', 'additions text');
113
116
  liveRegion.setAttribute('aria-atomic', `${this.props.isLiveRegionAtomic}`);
114
117
  }
@@ -121,6 +121,9 @@ let Alert = exports.Alert = (_dec = (0, _withDeterministicId.withDeterministicId
121
121
  (0, _console.logError)(liveRegion.getAttribute('role') === 'alert', `[Alert] live region must have role='alert' set on page load in order to announce content`);
122
122
  if (liveRegion) {
123
123
  liveRegion.setAttribute('aria-live', this.props.liveRegionPoliteness);
124
+ // indicates what notifications the user agent will trigger when the
125
+ // accessibility tree within a live region is modified.
126
+ // additions: elements are added, text: Text content is added
124
127
  liveRegion.setAttribute('aria-relevant', 'additions text');
125
128
  liveRegion.setAttribute('aria-atomic', `${this.props.isLiveRegionAtomic}`);
126
129
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/ui-alerts",
3
- "version": "10.4.1-snapshot-5",
3
+ "version": "10.4.1",
4
4
  "description": "An alert component",
5
5
  "author": "Instructure, Inc. Engineering and Product Design",
6
6
  "module": "./es/index.js",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "MIT",
25
25
  "devDependencies": {
26
- "@instructure/ui-axe-check": "10.4.1-snapshot-5",
27
- "@instructure/ui-babel-preset": "10.4.1-snapshot-5",
28
- "@instructure/ui-color-utils": "10.4.1-snapshot-5",
29
- "@instructure/ui-scripts": "10.4.1-snapshot-5",
30
- "@instructure/ui-test-utils": "10.4.1-snapshot-5",
26
+ "@instructure/ui-axe-check": "10.4.1",
27
+ "@instructure/ui-babel-preset": "10.4.1",
28
+ "@instructure/ui-color-utils": "10.4.1",
29
+ "@instructure/ui-scripts": "10.4.1",
30
+ "@instructure/ui-test-utils": "10.4.1",
31
31
  "@testing-library/jest-dom": "^6.4.6",
32
32
  "@testing-library/react": "^16.0.1",
33
33
  "@testing-library/user-event": "^14.5.2",
@@ -35,16 +35,16 @@
35
35
  },
36
36
  "dependencies": {
37
37
  "@babel/runtime": "^7.25.6",
38
- "@instructure/console": "10.4.1-snapshot-5",
39
- "@instructure/emotion": "10.4.1-snapshot-5",
40
- "@instructure/shared-types": "10.4.1-snapshot-5",
41
- "@instructure/ui-a11y-content": "10.4.1-snapshot-5",
42
- "@instructure/ui-buttons": "10.4.1-snapshot-5",
43
- "@instructure/ui-icons": "10.4.1-snapshot-5",
44
- "@instructure/ui-motion": "10.4.1-snapshot-5",
45
- "@instructure/ui-react-utils": "10.4.1-snapshot-5",
46
- "@instructure/ui-themes": "10.4.1-snapshot-5",
47
- "@instructure/ui-view": "10.4.1-snapshot-5",
38
+ "@instructure/console": "10.4.1",
39
+ "@instructure/emotion": "10.4.1",
40
+ "@instructure/shared-types": "10.4.1",
41
+ "@instructure/ui-a11y-content": "10.4.1",
42
+ "@instructure/ui-buttons": "10.4.1",
43
+ "@instructure/ui-icons": "10.4.1",
44
+ "@instructure/ui-motion": "10.4.1",
45
+ "@instructure/ui-react-utils": "10.4.1",
46
+ "@instructure/ui-themes": "10.4.1",
47
+ "@instructure/ui-view": "10.4.1",
48
48
  "keycode": "^2",
49
49
  "prop-types": "^15.8.1"
50
50
  },
@@ -153,6 +153,9 @@ class Alert extends Component<AlertProps, AlertState> {
153
153
 
154
154
  if (liveRegion) {
155
155
  liveRegion.setAttribute('aria-live', this.props.liveRegionPoliteness!)
156
+ // indicates what notifications the user agent will trigger when the
157
+ // accessibility tree within a live region is modified.
158
+ // additions: elements are added, text: Text content is added
156
159
  liveRegion.setAttribute('aria-relevant', 'additions text')
157
160
  liveRegion.setAttribute(
158
161
  'aria-atomic',
@@ -53,11 +53,23 @@ type AlertOwnProps = {
53
53
  */
54
54
  liveRegion?: () => Element
55
55
  /**
56
- * Choose the politeness level of screenreader alerts.
56
+ * Choose the politeness level of screenreader alerts, sets the value of
57
+ * `aria-live`.
58
+ *
59
+ * When regions are specified as `polite`, assistive technologies will notify
60
+ * users of updates but generally do not interrupt the current task,
61
+ * and updates take low priority.
62
+ *
63
+ * When regions are specified as `assertive`, assistive technologies will
64
+ * immediately notify the user, and could potentially clear the speech queue
65
+ * of previous updates.
57
66
  */
58
67
  liveRegionPoliteness?: 'polite' | 'assertive'
59
68
  /**
60
- * If the screenreader alert should be atomic
69
+ * Value for the `aria-atomic` attribute.
70
+ * `aria-atomic` controls how much is read when a change happens. Should only
71
+ * the specific thing that changed be read or should the entire element be
72
+ * read.
61
73
  */
62
74
  isLiveRegionAtomic?: boolean
63
75
  /**