@brightspace-ui/core 2.59.0 → 2.59.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.
@@ -32,13 +32,14 @@ The `d2l-dialog` element is a generic dialog that provides a slot for arbitrary
32
32
  * Label primary actions with clear and predictable language. Use verbs like, “Add” or “Save” that indicate the outcome of a dialog rather than, “OK” or “Close”
33
33
  * Keep dialog titles concise
34
34
  * Maintain a language relationship between the action that triggered the dialog, dialog title, and dialog primary button.
35
+ * When it is necessary to stack multiple dialogs, ensure the stacked dialog is nested within the DOM of the dialog containing the opener
35
36
  <!-- docs: end dos -->
36
37
 
37
38
  <!-- docs: start donts -->
38
39
  * Don’t use a dialog when you could reasonably use an alternative that preserves user context, like expanding options inline
39
40
  * Don’t use a dialog to show error, success, or warning messages. Use an inline or toast alert instead.
40
41
  * Avoid creating large, complex dialogs
41
- * Avoid invoking a dialog from another dialog (nested dialogs)
42
+ * Avoid opening a dialog from within other dialogs (stacking dialogs)
42
43
  * Avoid a title length that could easily wrap to two lines
43
44
  <!-- docs: end donts -->
44
45
  <!-- docs: end best practices -->
@@ -25,9 +25,13 @@ export function announce(message) {
25
25
  /* Need to give browser enough time to create the live region so that it will
26
26
  treat the change as an update. Firefox sometimes ignores changes if the region
27
27
  and update are made too quickly in succession. RequestAnimationFrame is not
28
- sufficient here. */
28
+ sufficient here. Also, for some strange reason, sometimes VO will not announce
29
+ duplicate messages even if we remove the child so we also append a non-breaking space. */
29
30
  const elem = [...container.childNodes].find((c) => c.textContent === message);
30
- if (elem) elem.parentNode.removeChild(elem);
31
+ if (elem) {
32
+ elem.parentNode.removeChild(elem);
33
+ message = message.concat('\u00A0');
34
+ }
31
35
  setTimeout(() => {
32
36
  container.appendChild(document.createTextNode(message));
33
37
  }, 200);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.59.0",
3
+ "version": "2.59.1",
4
4
  "description": "A collection of accessible, free, open-source web components for building Brightspace applications",
5
5
  "type": "module",
6
6
  "repository": "https://github.com/BrightspaceUI/core.git",