@brightspace-ui/core 3.83.1 → 3.85.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  # Backdrops
2
2
 
3
- The `d2l-backdrop` element displays a semi-transparent backdrop behind a specified sibling target element. It also hides elements other than the target from assistive technologies by applying `aria-hidden="true"`.
3
+ Use a backdrop to de-emphasize background elements and draw the user's attention to a dialog or other modal content.
4
4
 
5
5
  ## Backdrop [d2l-backdrop]
6
6
 
@@ -42,4 +42,10 @@ Elements with `aria-hidden` applied (as well as their descendants) are completel
42
42
 
43
43
  **When showing a backdrop**: first move focus inside the target, then set the `shown` attribute on the backdrop.
44
44
 
45
- **When hiding a backdrop**: first remove the `shown` attribute on the backdrop, then if appropriate move focus outside the target.
45
+ **When hiding a backdrop**: first remove the `shown` attribute on the backdrop, then if appropriate move focus outside the target.
46
+
47
+ ## Accessibility
48
+
49
+ The backdrop hides background elements from screen reader users by setting `aria-hidden="true"` on all elements other than the target element specified in `for-target`.
50
+
51
+ Before showing the backdrop, focus should be moved inside the target element — see [Focus Management](#focus-management) for more details.
@@ -4,7 +4,7 @@ This component assists with managing user focus within your web application.
4
4
 
5
5
  ## Focus Trap [d2l-focus-trap]
6
6
 
7
- The `d2l-focus-trap` is a generic container that will trap user focus from leaving. Focus will cycle to the first or last focusable elements when tabbing forwards or backwards respectively. It will also capture focus from the document when actively trapping.
7
+ The `d2l-focus-trap` is a generic container that will trap user focus from leaving. Focus will cycle to the first or last focusable elements when tabbing forwards or backwards respectively. It will also capture focus from the document when actively trapping. The consumer entirely handles `trap` being enabled or not.
8
8
 
9
9
  <!-- docs: demo code properties name:d2l-focus-trap sandboxTitle:'Focus Trap' -->
10
10
  ```html
@@ -30,3 +30,9 @@ The `d2l-focus-trap` is a generic container that will trap user focus from leavi
30
30
 
31
31
  - `d2l-focus-trap-enter`: dispatched when focus enters the trap. May be used to override initial focus placement when focus enters the trap.
32
32
  <!-- docs: end hidden content -->
33
+
34
+ ## Accessibility
35
+
36
+ Focus trapping should only be used in proper context, such as modal dialogs, where the user has an obvious way to exit via keyboard. For example, the [modal dialog w3c documentation](https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/) recommends that "the tab sequence of all dialogs include a visible element with role button that closes the dialog, such as a close icon or cancel button."
37
+
38
+ When using focus trapping, be wary of [SC 2.1.2 "No Keyboard Trap"](https://www.w3.org/TR/UNDERSTANDING-WCAG20/keyboard-operation-trapping.html), which discusses not trapping a user's keyboard focus such that they cannot leave and navigate the remainder of the page.
@@ -201,7 +201,7 @@ export const ListItemMixin = superclass => class extends composeMixins(
201
201
  }
202
202
  [slot="content"] {
203
203
  display: flex;
204
- justify-content: stretch;
204
+ justify-content: start;
205
205
  padding: 0.55rem 0.55rem 0.55rem 0;
206
206
  }
207
207
  :host([dir="rtl"]) [slot="content"] {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "3.83.1",
3
+ "version": "3.85.0",
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",