pax_global_header 0000666 0000000 0000000 00000000064 15215545443 0014522 g ustar 00root root 0000000 0000000 52 comment=7dbb9e9bf1636b02c2fc6955f0719648bb465743
focus-trap-tabbable-323a706/ 0000775 0000000 0000000 00000000000 15215545443 0015606 5 ustar 00root root 0000000 0000000 focus-trap-tabbable-323a706/.all-contributorsrc 0000664 0000000 0000000 00000011725 15215545443 0021445 0 ustar 00root root 0000000 0000000 {
"projectName": "tabbable",
"projectOwner": "focus-trap",
"repoType": "github",
"repoHost": "https://github.com",
"files": [
"README.md"
],
"imageSize": 100,
"badgeTemplate": "[](#contributors)",
"commit": false,
"commitConvention": "none",
"contributors": [
{
"login": "davidtheclark",
"name": "David Clark",
"avatar_url": "https://avatars2.githubusercontent.com/u/628431?v=4",
"profile": "http://davidtheclark.com/",
"contributions": [
"code",
"bug",
"infra",
"test",
"doc",
"maintenance"
]
},
{
"login": "stefcameron",
"name": "Stefan Cameron",
"avatar_url": "https://avatars3.githubusercontent.com/u/2855350?v=4",
"profile": "https://stefancameron.com/",
"contributions": [
"code",
"bug",
"infra",
"test",
"doc",
"maintenance"
]
},
{
"login": "Andarist",
"name": "Mateusz Burzyński",
"avatar_url": "https://avatars2.githubusercontent.com/u/9800850?v=4",
"profile": "https://github.com/Andarist",
"contributions": [
"code",
"bug",
"doc"
]
},
{
"login": "dependabot",
"name": "Dependabot",
"avatar_url": "https://avatars1.githubusercontent.com/u/27347476?v=4",
"profile": "https://github.com/features/security",
"contributions": [
"maintenance"
]
},
{
"login": "khamiltonuk",
"name": "Kristian Hamilton",
"avatar_url": "https://avatars1.githubusercontent.com/u/4013283?v=4",
"profile": "http://www.khamilton.co.uk",
"contributions": [
"bug"
]
},
{
"login": "idoros",
"name": "Ido Rosenthal",
"avatar_url": "https://avatars1.githubusercontent.com/u/574751?v=4",
"profile": "https://github.com/idoros",
"contributions": [
"bug",
"code",
"review",
"test"
]
},
{
"login": "pebble2050",
"name": "pebble2050",
"avatar_url": "https://avatars1.githubusercontent.com/u/47210889?v=4",
"profile": "https://github.com/pebble2050",
"contributions": [
"bug"
]
},
{
"login": "tidychips",
"name": "Bryan Murphy",
"avatar_url": "https://avatars2.githubusercontent.com/u/11446636?v=4",
"profile": "https://github.com/tidychips",
"contributions": [
"bug",
"code"
]
},
{
"login": "thawkin3",
"name": "Tyler Hawkins",
"avatar_url": "https://avatars0.githubusercontent.com/u/13806458?v=4",
"profile": "http://tylerhawkins.info/201R/",
"contributions": [
"tool",
"test",
"infra",
"doc"
]
},
{
"login": "DaviDevMod",
"name": "DaviDevMod",
"avatar_url": "https://avatars.githubusercontent.com/u/98312056?v=4",
"profile": "https://github.com/DaviDevMod",
"contributions": [
"bug",
"code",
"test",
"doc"
]
},
{
"login": "rvsia",
"name": "Richard Všianský",
"avatar_url": "https://avatars.githubusercontent.com/u/32869456?v=4",
"profile": "https://github.com/rvsia",
"contributions": [
"doc"
]
},
{
"login": "craigkovatch",
"name": "Craig Kovatch",
"avatar_url": "https://avatars.githubusercontent.com/u/10970257?v=4",
"profile": "https://github.com/craigkovatch",
"contributions": [
"bug"
]
},
{
"login": "BFrost",
"name": "bfrost",
"avatar_url": "https://avatars.githubusercontent.com/u/3368761?v=4",
"profile": "https://github.com/BFrost",
"contributions": [
"bug"
]
},
{
"login": "les-lim",
"name": "Les Lim",
"avatar_url": "https://avatars.githubusercontent.com/u/7660876?v=4",
"profile": "https://github.com/les-lim",
"contributions": [
"bug"
]
},
{
"login": "thumbsupep",
"name": "Erica Pramer",
"avatar_url": "https://avatars.githubusercontent.com/u/5598732?v=4",
"profile": "https://github.com/thumbsupep",
"contributions": [
"test"
]
},
{
"login": "fpapado",
"name": "Fotis Papadogeorgopoulos",
"avatar_url": "https://avatars.githubusercontent.com/u/3210764?v=4",
"profile": "http://fotis.xyz",
"contributions": [
"code",
"test"
]
},
{
"login": "spaansba",
"name": "Bart Spaans",
"avatar_url": "https://avatars.githubusercontent.com/u/143680439?v=4",
"profile": "https://www.bartspaans.com/",
"contributions": [
"infra",
"code",
"bug"
]
}
],
"contributorsPerLine": 7,
"contributorsSortAlphabetically": true,
"skipCi": true,
"commitType": "docs"
}
focus-trap-tabbable-323a706/.changeset/ 0000775 0000000 0000000 00000000000 15215545443 0017625 5 ustar 00root root 0000000 0000000 focus-trap-tabbable-323a706/.changeset/README.md 0000664 0000000 0000000 00000001000 15215545443 0021073 0 ustar 00root root 0000000 0000000 # Changesets
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
focus-trap-tabbable-323a706/.changeset/config.json 0000664 0000000 0000000 00000000402 15215545443 0021761 0 ustar 00root root 0000000 0000000 {
"$schema": "https://unpkg.com/@changesets/config@1.3.0/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"linked": [],
"access": "public",
"baseBranch": "master",
"updateInternalDependencies": "patch",
"ignore": []
}
focus-trap-tabbable-323a706/.github/ 0000775 0000000 0000000 00000000000 15215545443 0017146 5 ustar 00root root 0000000 0000000 focus-trap-tabbable-323a706/.github/dependabot.yml 0000664 0000000 0000000 00000000637 15215545443 0022004 0 ustar 00root root 0000000 0000000 version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'wednesday'
time: '00:00'
timezone: 'America/Chicago' # 12am Central Time
commit-message:
prefix: '[DEPENDABOT]'
labels:
- 'dependencies'
- 'dependabot'
open-pull-requests-limit: 10
reviewers:
- 'stefcameron'
versioning-strategy: 'increase'
focus-trap-tabbable-323a706/.github/pull_request_template.md 0000664 0000000 0000000 00000002320 15215545443 0024104 0 ustar 00root root 0000000 0000000
...ADD PR DETAILS HERE...
PR Checklist
__Please leave this checklist in your PR.__
- Source changes maintain stated browser compatibility.
- Web APIs introduced have __deep__ browser coverage, including Safari (often very late to adopt new APIs).
- Issue being fixed is referenced.
- Unit test coverage added/updated.
- E2E test coverage added/updated.
- Typings added/updated.
- Changes do not break SSR:
- Careful to test `typeof document/window !== 'undefined'` before using it in code that gets executed on load.
- README updated (API changes, instructions, etc.).
- Changes to dependencies explained.
- Changeset added (run `npm run changeset` locally to add one, and follow the prompts).
- EXCEPTION: A Changeset is not required if the change does not affect any of the source files that produce the package bundle. For example, demo changes, tooling changes, test updates, or a new dev-only dependency to run tests more efficiently should not have a Changeset since it will not affect package consumers.
focus-trap-tabbable-323a706/.github/workflows/ 0000775 0000000 0000000 00000000000 15215545443 0021203 5 ustar 00root root 0000000 0000000 focus-trap-tabbable-323a706/.github/workflows/ci.yml 0000664 0000000 0000000 00000003773 15215545443 0022333 0 ustar 00root root 0000000 0000000 name: CI
on:
push:
branches:
- 'master'
pull_request:
jobs:
test:
name: Check lint/types/unit-test/build
runs-on: ubuntu-latest
env:
CI: true
strategy:
matrix:
node-version: ['latest']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
check-latest: true
cache: npm
- name: Install packages
run: npm ci
- name: Lint
run: |-
npm run format:check;
npm run lint;
- name: Test
run: |-
npm run test:types;
npm run test:unit;
- name: Build # Tests to see if a build can succeed
run: npm run build
E2E:
runs-on: ubuntu-22.04
name: e2e
strategy:
matrix:
browser: [chrome, firefox]
timeout-minutes: 20
container:
# https://hub.docker.com/r/cypress/browsers/tags
#
# NOTE: At least Chrome 102 is required for testing `inert` attribute support.
# At least Chrome 105 and Firefox 106 are required for `Element#checkVisibility` support.
# At least FireFox 135 is required for Cypress >=15.
image: cypress/browsers:node-22.21.0-chrome-141.0.7390.107-1-ff-144.0-edge-141.0.3537.92-1
options: --user 1001 --shm-size=2g # @see https://github.com/cypress-io/github-action/issues/104#issuecomment-666047965
env:
BABEL_ENV: test
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Test E2E
# https://github.com/cypress-io/github-action
# https://github.com/cypress-io/code-coverage
uses: cypress-io/github-action@v5 # will run all tests found per cypress.config.js
with:
browser: ${{ matrix.browser }}
env: coverage=true
- name: Upload coverage to Codecov
# https://github.com/marketplace/actions/codecov
uses: codecov/codecov-action@v2
focus-trap-tabbable-323a706/.github/workflows/release.yml 0000664 0000000 0000000 00000002464 15215545443 0023354 0 ustar 00root root 0000000 0000000 name: Release
on:
push:
branches: [master]
permissions:
# `id-token` and `contents` are required for NPM Trusted Publishing with OIDC
# @see https://docs.npmjs.com/trusted-publishers
id-token: write
# need write so CI can push tags / branches / create PRs
contents: write
pull-requests: write
jobs:
release:
name: Release
runs-on: ubuntu-latest
env:
CI: true
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GH_TOKEN }}
- name: Setup environment
id: setup
run: |-
echo "npm-cache-dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
check-latest: true
registry-url: 'https://registry.npmjs.org' # required for NPM Trusted Publishing
# Ensure npm >=11.5.1 installed for NPM Trusted Publishing
- name: Updated npm
run: npm install -g npm@latest
- name: Install packages
run: npm ci
- name: Test All
run: npm run test
- name: Create Release or Publish
id: changesets
uses: changesets/action@v1
with:
publish: npm run release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
focus-trap-tabbable-323a706/.gitignore 0000664 0000000 0000000 00000002102 15215545443 0017571 0 ustar 00root root 0000000 0000000 # Logs
logs
*.log
npm-debug.log*
# this project uses NPM
.yarn-integrity
yarn-debug.log*
yarn-error.log*
yarn.lock
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# nyc test coverage
.nyc_output
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Typescript v1 declaration files
typings/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# dotenv environment variables file
.env
# IDE files
.vscode/
# Builds
dist/
# demo-bundle.js generated when running the demo
**/*-bundle.js
# OS files
.DS_Store
.Thumbs
# Cypress local artifacts
cypress/videos
cypress/screenshots
focus-trap-tabbable-323a706/.prettierignore 0000664 0000000 0000000 00000000052 15215545443 0020646 0 ustar 00root root 0000000 0000000 coverage
dist
node_modules
**/*-bundle.js
focus-trap-tabbable-323a706/.prettierrc.js 0000664 0000000 0000000 00000000677 15215545443 0020417 0 ustar 00root root 0000000 0000000 /* eslint-env node */
module.exports = {
arrowParens: 'always',
bracketSpacing: true,
embeddedLanguageFormatting: 'auto',
endOfLine: 'lf',
htmlWhitespaceSensitivity: 'strict',
insertPragma: false,
bracketSameLine: false,
jsxSingleQuote: false,
printWidth: 80,
proseWrap: 'never',
quoteProps: 'as-needed',
requirePragma: false,
semi: true,
singleQuote: true,
tabWidth: 2,
trailingComma: 'es5',
useTabs: false,
};
focus-trap-tabbable-323a706/CHANGELOG.md 0000664 0000000 0000000 00000030637 15215545443 0017430 0 ustar 00root root 0000000 0000000 # Changelog
## 6.5.0
### Minor Changes
- 8e6c074: Add support for `` elements with an `href` attribute (image map hotspots),
### Patch Changes
- f656723: Treat elements with `visibility: collapse` as hidden, the same way `visibility: hidden` is already handled, so they are no longer considered tabbable or focusable. This matches browser behavior, where `collapse` hides an element (outside of table rows/columns) just like `hidden`.
## 6.4.0
### Minor Changes
- 26a1d80: Enable CSS selector matching for whether an element is in an inert subtree (`[inert] *`).
This was previously disabled due to JSDOM's CSS selector engine being incompatible with this selector, and throwing all the results off. Instead, tabbable would perform manual checks for an element being in an inert subtree. The CSS selector issue appears to have been fixed in recent JSDOM versions (at least 26), so this version reintroduces the selector fast path.
## 6.3.0
### Minor Changes
- fae1e50: feat: add 'full-native' `displayCheck` option, utilising Element#checkVisibility
## 6.2.0
### Minor Changes
- 18a093f: Add new `getTabIndex()` API which enables Focus-trap to determine tab indexes in the same way as Tabbable when necessary (see [focus-trap#974](https://github.com/focus-trap/focus-trap/pull/974)).
## 6.1.2
### Patch Changes
- b39b217: Pin jsdom downstream dependency nwsapi to v2.2.2 while awaiting fix ([#982](https://github.com/focus-trap/tabbable/issues/982))
## 6.1.1
### Patch Changes
- 97373cc: Fix JSDom not supporting HTMLElement.inert and HTMLElement.contentEditable APIs, and not supporting CSS selector ':not([inert *])' resulting in no nodes found and "focus-trap must have at least one tabbable node..." error in focus-trap.
## 6.1.0
### Minor Changes
- 1756c90: Add support for new [inert](https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert#browser_compatibility) attribute ([#292](https://github.com/focus-trap/tabbable/issues/292))
### Patch Changes
- b8c7550: Fix a corner case where a node's root node can be itself, indicating detachment from the DOM, leading to a crash in `isHidden() -> isNodeAttached() -> getRootNode()` if not handled properly ([focus-trap-react #905](https://github.com/focus-trap/focus-trap-react/issues/905))
## 6.0.1
### Patch Changes
- 0aab1e3: Fix crash with tabbable scoped table header elements ([#832](https://github.com/focus-trap/tabbable/issues/832))
## 6.0.0
### Major Changes
- 5f40c8e: Revised and clarified official browser support (still as broad and deep as _reasonably_ possible).
- 5f40c8e: 🚨 **Breaking:** Dropped support of IE browsers, all versions.
- IE11 was [officially retired](https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/) on June 15, 2022 (6 weeks ago). There are no longer any versions of IE that are still maintained or even supported by Microsoft.
- a09ba0b: 🚨 **Breaking:** Default `displayCheck` 'full' option no longer treats detached nodes as visible. Use the new 'legacy-full' option to restore old (incorrect) behavior only if you must. Ideally, make sure tabbable only runs once all nodes of interest have been attached to the document.
## 5.3.3
### Patch Changes
- 0210a1c: fix: align with browser behaviour when a web component has a negative tabindex
## 5.3.2
### Patch Changes
- 320bfd1: Updated docs for `displayCheck` configuration.
- aa2a699: Fixed an issue with `displayCheck=full` (default setting) determining all nodes were hidden when the container is not attached to the document. In this case, tabbable will revert to a `displayCheck=none` mode, which is the equivalent legacy behavior. Also updated the `displayCheck` option docs to add warnings about this corner case for the `full` and `non-zero-area` modes. `non-zero-area` behaves differently in the corner case. See the docs for more info.
## 5.3.1
### Patch Changes
- cf1da66: Add warnings and help in documentation about running tabbable under JSDom (e.g. with Jest). JSDom is not technically supported, and 5.3.0 introduced some changes that use DOM APIs that JSDom stubs out, which may cause some JSDom-based tests to fail. Also revamp the API docs a bit to make them clearer, and add missing `getShadowRoot` option to `isTabbable()` and `isFocusable()` (docs only; no code changes necessary).
## 5.3.0
### 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 `