From 796b780922143355e1aa5e158fc5909f6a72d76b Mon Sep 17 00:00:00 2001 From: Stefan Cameron Date: Fri, 28 Jan 2022 13:58:12 -0600 Subject: [PATCH] Prepare for 5.3.0-beta.0 --- CHANGELOG.md | 5 +++++ README.md | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f5f5010..ffafa9ec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # Changelog +## 5.3.0-beta.0 + +- Includes new Shadow DOM support for open shadows by default +- Includes a new `getShadowRoot()` configuration option, enabling support for closed shadows + ## 5.2.1 ### Patch Changes diff --git a/README.md b/README.md index 10c8e7aa..19ab95f8 100644 --- a/README.md +++ b/README.md @@ -91,6 +91,16 @@ Type: `full` | `non-zero-area` | `none` . Default: `full`. Configures how to check if an element is displayed, see ["Display check"](#display-check) below. +##### getShadowRoot + +Type: `(node: FocusableElement) => ShadowRoot | boolean | undefined` + +Returns the node's `ShadowRoot` if available, or a `boolean` indicating if a `ShadowRoot` is attached but not available. `node` will be a descendent of the `rootNode` given to `tabbable()`. + +If `true` is returned, Tabbable assumes a closed `ShadowRoot` is attached and will iterate the `node`'s children for additional tabbable/focusable candidates. + +If a falsy value is returned, all children will be ignored as candidates. + ### isTabbable ```js