@brightspace-ui/core 2.86.2 → 2.86.3

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.
@@ -349,7 +349,10 @@ Collapsible panels have two optional slots, `header` and `actions` that can be u
349
349
  </div>
350
350
  <d2l-collapsible-panel-summary-item slot="summary" text="Week 2 Lab (PDF) attached"></d2l-collapsible-panel-summary-item>
351
351
  <d2l-collapsible-panel-summary-item slot="summary" text="1 comment"></d2l-collapsible-panel-summary-item>
352
- Expanded content
352
+ <p style="margin-top: 0;">Sweet roll candy dessert caramels shortbread gummies toffee oat cake cookie. Wafer gummies shortbread sweet halvah jujubes sweet. Cake chocolate chocolate bar carrot cake marzipan. Icing chupa chups jujubes macaroon toffee chocolate bar wafer croissant.</p>
353
+ <p>Toffee pastry chupa chups lollipop carrot cake chocolate cake sweet roll sweet roll. Marzipan pudding candy canes jelly lemon drops oat cake ice cream. Wafer danish pudding marzipan chupa chups jelly beans brownie.</p>
354
+ <p>Pastry apple pie biscuit sesame snaps sweet pie apple pie dessert jelly beans. Lemon drops croissant tootsie roll croissant oat cake. Macaroon toffee pie gummi bears cupcake wafer tiramisu.</p>
355
+ <p style="margin-bottom: 0;">Chocolate cake ice cream cake chocolate bar dessert. Donut tiramisu fruitcake tiramisu liquorice shortbread sugar plum macaroon caramels. Tart candy cookie ice cream dessert tootsie roll.</p>
353
356
  </d2l-collapsible-panel>
354
357
  ```
355
358
 
@@ -103,15 +103,16 @@ class CollapsiblePanel extends RtlMixin(LitElement) {
103
103
  :host(:not([expanded])) .d2l-collapsible-panel {
104
104
  cursor: pointer;
105
105
  }
106
- :host([type=subtle]) .d2l-collapsible-panel {
106
+ :host([type="subtle"]) .d2l-collapsible-panel {
107
107
  background-color: white;
108
108
  border: none;
109
109
  box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.03);
110
110
  }
111
- :host([type=inline]) .d2l-collapsible-panel {
111
+ :host([type="inline"]) .d2l-collapsible-panel {
112
112
  border-left: none;
113
113
  border-radius: 0;
114
114
  border-right: none;
115
+ outline-offset: -2px;
115
116
  }
116
117
  :host([heading-style="1"]) {
117
118
  --d2l-collapsible-panel-header-spacing: 1.2rem;
@@ -124,6 +125,10 @@ class CollapsiblePanel extends RtlMixin(LitElement) {
124
125
  cursor: pointer;
125
126
  padding: var(--d2l-collapsible-panel-header-spacing) 0;
126
127
  }
128
+ :host([type="inline"]) .d2l-collapsible-panel-header {
129
+ border-radius: 0;
130
+ outline-offset: -2px;
131
+ }
127
132
  .d2l-collapsible-panel.scrolled .d2l-collapsible-panel-header {
128
133
  background-color: white;
129
134
  box-shadow: 0 8px 12px -9px rgba(0, 0, 0, 0.3);
@@ -257,16 +257,28 @@ document.querySelector('#open').addEventListener('click', () => {
257
257
  });
258
258
  ```
259
259
 
260
- ## Focus Management
260
+ ## Accessibility
261
+
262
+ ### Focus Management
261
263
 
262
264
  When opened, focus will be automatically placed within the dialog. The element to be focused will either be the content element having the optional `autofocus` attribute, or a focusable element identified by the dialog depending on the type of dialog. For `d2l-dialog` and `d2l-dialog-fullscreen`, the first focusable element will be focused. For `d2l-dialog-confirm`, the least destructive action will be focused, which is assumed to be the first non-primary button in the footer.
263
265
 
264
- ### Specifying an `autofocus` Element (Optional)
266
+ #### Specifying an `autofocus` Element (Optional)
265
267
 
266
268
  To specify which element should be focused, add the `autofocus` attribute to that element. An element with the `autofocus` attribute will receive focus if the element has a `tabindex` value of `0` or `-1`, or is a naturally focusable element (e.g. button).
267
269
 
268
270
  Note that the element must be in the dialog content's DOM scope and not within another component's Shadow DOM.
269
271
 
272
+ ### Announcing the dialog text
273
+
274
+ When using `d2l-dialog` or `d2l-dialog-fullscreen` the dialog text will not be announced by screen readers. Screen readers will announce the presence of a dialog, the dialog title, and the currently focused element. For example, the general dialog example at the top of this page reads "Dialog Title dialog. clickable Done button.". The text "Some dialog content" is not announced.
275
+
276
+ To announce the dialog text, use one of the following methods:
277
+
278
+ 1. Use `d2l-dialog-confirm` instead
279
+ 2. Add `describe-content="true"` (if using `d2l-dialog`)
280
+ 3. Set `autofocus` on the first text element (see above for details)
281
+
270
282
  <!-- docs: start hidden content -->
271
283
  ## Future Improvements
272
284
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.86.2",
3
+ "version": "2.86.3",
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",