@brightspace-ui/core 2.29.6 → 2.30.0

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.
@@ -256,6 +256,16 @@ document.querySelector('#open').addEventListener('click', () => {
256
256
  });
257
257
  ```
258
258
 
259
+ ## Focus Management
260
+
261
+ 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.
262
+
263
+ ### Specifying an `autofocus` Element (Optional)
264
+
265
+ 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).
266
+
267
+ Note that the element must be in the dialog content's DOM scope and not within another component's Shadow DOM.
268
+
259
269
  <!-- docs: start hidden content -->
260
270
  ## Future Improvements
261
271
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightspace-ui/core",
3
- "version": "2.29.6",
3
+ "version": "2.30.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",