Skip to content

chore(deps): bump focus-trap from 7.6.5 to 8.2.0#114829

Open
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/focus-trap-8.2.0
Open

chore(deps): bump focus-trap from 7.6.5 to 8.2.0#114829
dependabot[bot] wants to merge 1 commit intomasterfrom
dependabot/npm_and_yarn/focus-trap-8.2.0

Conversation

@dependabot
Copy link
Copy Markdown
Contributor

@dependabot dependabot Bot commented on behalf of github May 5, 2026

Bumps focus-trap from 7.6.5 to 8.2.0.

Release notes

Sourced from focus-trap's releases.

v8.2.0

Minor Changes

  • 567dbe1: Add new delayReturnFocus option (default true) to control whether return focus and onPostDeactivate are deferred by one frame (#1689).

Patch Changes

  • b70e8d9: Fix bug where removing the ancestor of a focused node within a trap would result in focus landing on the body instead of remaining in the trap (#1660).

v8.1.0

Minor Changes

  • 642f7f2: Update lifecycle hooks to include the associated focus trap as a parameter.

v8.0.1

Patch Changes

  • 7d5010e: Loosen checkCanFocusTrap Promise resolution type to unknown to make it easier to use Promise.all() or Promise.allSettled() as the returned Promise (Promise<void> was causing issues because those Promise APIs do not resolve with a void value).

v8.0.0

Major Changes

  • b6ea4b5: Breaking: Fixed a long-standing bug where onPostActivate() would be called before the initial focus node was focused and the trap was fully activated. (#1747)
    • By default (and for many years now), a trap delays setting focus to the initial focus node to the next frame (setTimeout(0)) but wasn't delaying calling onPostActivate() until after that delay.
    • With the new isolateSubtrees='aria-hidden' option, the currently-focused node's container (a non-subtree being "disabled") would get hidden before the delay was up, resulting in Chrome preventing the effect of aria-hidden on that subtree with a warning in the console due to the container being hidden still containing focus (e.g. the "activate trap" button).
    • With the fix, subtree isolation and the call to onPostActivate() await the initial focus delay (if there is one, which is default behavior; remove it with delayInitialFocus=false) before being applied/called.
    • This may cause tests to fail, requiring the addition of slight delays before testing a given state (e.g. await waitFor(() => expect(initialFocusNode).toBeFocused()).
    • It may also disrupt current assumptions about the state of the initial focus node in code that runs in your onPostActivate() handler (prior to this change, that node would not be focused yet; after this change, it will be focused).

v7.8.0

Minor Changes

  • c214581: Adds aria-hidden support to isolateSubtrees config option

Patch Changes

  • bb36e15: Fix undefined method _setSubtreeIsolation crash when using trapStack in DOM with older versions of Focus-trap (#1729)

v7.7.1

Patch Changes

  • a386578: Bump tabbable dependency for improved inert handling

v7.7.0

Minor Changes

  • 14b9155: Adds a new feature "isolateSubtrees", allowing focus-trap to prevent screen readers from reading content outside the trap. (#1575)

v7.6.6

Patch Changes

... (truncated)

Changelog

Sourced from focus-trap's changelog.

8.2.0

Minor Changes

  • 567dbe1: Add new delayReturnFocus option (default true) to control whether return focus and onPostDeactivate are deferred by one frame (#1689).

Patch Changes

  • b70e8d9: Fix bug where removing the ancestor of a focused node within a trap would result in focus landing on the body instead of remaining in the trap (#1660).

8.1.0

Minor Changes

  • 642f7f2: Update lifecycle hooks to include the associated focus trap as a parameter.

8.0.1

Patch Changes

  • 7d5010e: Loosen checkCanFocusTrap Promise resolution type to unknown to make it easier to use Promise.all() or Promise.allSettled() as the returned Promise (Promise<void> was causing issues because those Promise APIs do not resolve with a void value).

8.0.0

Major Changes

  • b6ea4b5: Breaking: Fixed a long-standing bug where onPostActivate() would be called before the initial focus node was focused and the trap was fully activated. (#1747)
    • By default (and for many years now), a trap delays setting focus to the initial focus node to the next frame (setTimeout(0)) but wasn't delaying calling onPostActivate() until after that delay.
    • With the new isolateSubtrees='aria-hidden' option, the currently-focused node's container (a non-subtree being "disabled") would get hidden before the delay was up, resulting in Chrome preventing the effect of aria-hidden on that subtree with a warning in the console due to the container being hidden still containing focus (e.g. the "activate trap" button).
    • With the fix, subtree isolation and the call to onPostActivate() await the initial focus delay (if there is one, which is default behavior; remove it with delayInitialFocus=false) before being applied/called.
    • This may cause tests to fail, requiring the addition of slight delays before testing a given state (e.g. await waitFor(() => expect(initialFocusNode).toBeFocused()).
    • It may also disrupt current assumptions about the state of the initial focus node in code that runs in your onPostActivate() handler (prior to this change, that node would not be focused yet; after this change, it will be focused).

7.8.0

Minor Changes

  • c214581: Adds aria-hidden support to isolateSubtrees config option

Patch Changes

  • bb36e15: Fix undefined method _setSubtreeIsolation crash when using trapStack in DOM with older versions of Focus-trap (#1729)

7.7.1

Patch Changes

  • a386578: Bump tabbable dependency for improved inert handling

7.7.0

... (truncated)

Commits
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for focus-trap since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [focus-trap](https://github.com/focus-trap/focus-trap) from 7.6.5 to 8.2.0.
- [Release notes](https://github.com/focus-trap/focus-trap/releases)
- [Changelog](https://github.com/focus-trap/focus-trap/blob/master/CHANGELOG.md)
- [Commits](focus-trap/focus-trap@v7.6.5...v8.2.0)

---
updated-dependencies:
- dependency-name: focus-trap
  dependency-version: 8.2.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 5, 2026
@dependabot dependabot Bot requested a review from a team as a code owner May 5, 2026 02:18
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels May 5, 2026
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 5, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.40%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants