Skip to content

Releases: focus-trap/tabbable

v5.3.0

20 Apr 23:14
a6018d4

Choose a tag to compare

Minor Changes

  • 685a906: Adds new Shadow DOM support (must be explicitly enabled using the new getShadowRoot option).
    • When enabled, supports open shadows by default, and can support closed shadows if the option is a function that returns the shadow for a given node. See documentation for more information.
    • Includes all updates from 5.3.0-beta.0 and 5.3.0-beta.1 releases.

Patch Changes

  • b341412: Made "isDisabledFromFieldset" more readable and concise (even marginally faster).
  • 685a906: Fixed a bug in getTabIndex: the tab index of <audio>, <video> and <details> was left to the browser default if explicitly set to a value that couldn't be parsed as integer, leading to inconsistent behavior across browsers. Also slightly modified the function's logic to make it more efficient. Finally added tests to cover the fix.
  • dd6d0ec: Optimized and extended displayCheck: "full" option (now checks for any element having no display boxes) and added test for display: "contents" property (this bug was never reported). (#592)
  • 193fca2: Fixed bug in isDisabledFromFieldset. The function wasn't checking whether the disabled <fieldset> containing node is the top-most disabled <fieldset> (#596).

v5.2.1

14 Aug 16:34
4507ab7

Choose a tag to compare

Patch Changes

  • 1d5fcb5: Fixed: Form elements in disabled fieldsets should not be tabbable/focusable (#413)

v5.2.0

09 Apr 13:37
be458c8

Choose a tag to compare

Minor Changes

  • bf0a8f0: Exposed an option to select the way that an element is checked as displayed

v5.1.6

19 Feb 17:22
8ada32f

Choose a tag to compare

Patch Changes

  • f9f6d25: Replaces Karma/Mocha/Sinon/Chai in test suite with Jest/Dom Testing Library. Removes README reference to identifying anchor tags with an xlink:href attribute as tabbable since that information is incorrect.

v5.1.5

16 Dec 17:46
b409b0b

Choose a tag to compare

Patch Changes

  • c048203: fix crash when radio button name attributes contain CSS selector special characters (#168)

v5.1.4

25 Nov 17:35
c2e38ab

Choose a tag to compare

Patch Changes

  • a188c71: use element.matches fallback for IE11 and Webkit5
  • 0d4cdf8: Update the code to use const/let and function declarations only for the repo; this does NOT affect browser compatibility as the code is still transpiled when published into the ./dist directory for various targets.

v5.1.3

26 Oct 16:34
0bb73f8

Choose a tag to compare

Patch Changes

  • 5579825: fixes to details elements
    • ignore elements nested under a closed details element
    • ignore any extra summary elements after the first summary element
    • add details element as tabbable in case it has no direct summary element

v5.1.2

07 Oct 23:52
f351691

Choose a tag to compare

Patch Changes

  • d3c6514: Fix UMD build incorrectly using focusTrap as output name.
  • 95563c2: Fix #99: Transpile ESM bundle down to the same browser target used for the CJS and UMD bundles. ESM is just the module system, not the browser target.

v5.1.1

05 Oct 18:56
8a1863d

Choose a tag to compare

Patch Changes

  • fb49d23: Fix #96: Transpile non-minified bundles for expected browser targets.

v5.1.0

19 Sep 19:30
c7a9a2c

Choose a tag to compare

Minor Changes

  • bd21d91: Add focusable() for getting all focusable nodes.

Patch Changes

  • 3665d0b: The TypeScript return type of tabbable has been fixed: Was Array<Element> (an Element is technically not focusable), is now Array<HTMLElement | SVGElement> (which are both still/also Element instances).
  • 8a25135: Fixed: Tabbable elements in fixed-position (position: fixed) containers should now be consistently found in supported browsers.
  • 9544de2: Replace prepublishOnly script with prepare script. This has the added benefit of running automatically when installing the package from GitHub (as supported by NPM) where the published ./dist directory is not automatically included.
  • 672f4a2: Add focusable() type definition.
  • 2424c0f: Small improvements for improving tree-shakeability of this package. A missing #__PURE__ annotation has been added to allow dropping one of the top-level calls (if its result stays unused) and removed minification of the file referenced as package.json#module to avoid dropping the comments (including existing #__PURE__ annotations).