{"_id":"@a11y-oracle/focus-analyzer","_rev":"10-622f70cc9f4fe9d0010e3aecced28192","name":"@a11y-oracle/focus-analyzer","dist-tags":{"latest":"1.3.2"},"versions":{"1.0.0":{"name":"@a11y-oracle/focus-analyzer","version":"1.0.0","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.0.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"a39fa1bb34e3386fa5aee3526946f65541c7643e","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.0.0.tgz","fileCount":17,"integrity":"sha512-amfT5SLLS942prNKuI8aQGvaPehrLRnpOKDciHX75CCXVynOCmPJPIZZ/TKijCbqmCoD3aQETQEdUpCx9ovYxw==","signatures":[{"sig":"MEUCIF4RWlBXERh8ZNjd5h9sFCpcKu8HQwUhHAduH4yY2Ld6AiEAtu6QJcWRnPwwpMvZyiJiDKC+qFeWc46nDBkuP1EyUns=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38144},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"04ad8c1a2a9a6335892d5c992fcfa209e6a7bb6f","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.0.0","@a11y-oracle/keyboard-engine":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.0.0_1772652304046_0.02072562859696614","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@a11y-oracle/focus-analyzer","version":"1.1.0","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.1.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"f9cdb94670c8f83dc1394516f06d4df8acaeb4d8","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.1.0.tgz","fileCount":17,"integrity":"sha512-r1izzcAjou1z+oGnYtdNoyrBLEVZqTuZ+XYAGwungNzAt46SJYzaiVdIZuM0aSG8RhNOQ2tJFSQAZRqhY9hirw==","signatures":[{"sig":"MEYCIQCA2/bIgGFqIIp446ECqAh4t87dBYMJeFE1ZGrbMA/u5QIhAKTRV0SbVbOUzscatsEqRVrULvrPyBWxy9m/cBe5XxGA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38144},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"47a95777878b177bbe3fc88cb760a2b295296555","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.1.0","@a11y-oracle/keyboard-engine":"1.1.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.1.0_1772686074648_0.27166660425610667","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@a11y-oracle/focus-analyzer","version":"1.1.1","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.1.1","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"50832fbc9bfd0abe93a373d2afea2bd22a97daba","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.1.1.tgz","fileCount":17,"integrity":"sha512-A2Sf8S8SgGOvbQ7DJ9JfxSs33KRjrhG2Wki78TWxTvzCFnfqBn76zneU8tZrrxk7kPRAF7at4oUjkQZ4tLiAGw==","signatures":[{"sig":"MEUCIEn08akllsT8Fa5OzQOD44NUxoU5GEZ6BV2AtiU9mKylAiEAiJG22P4wlSuld9ooRRD10N2OSjNqYbjp5Cepe7yMrfg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38144},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"555a54f42e89930cf78efd3b4d47055f8a9ca62e","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.1.1","@a11y-oracle/keyboard-engine":"1.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.1.1_1772690058618_0.5661990096695872","host":"s3://npm-registry-packages-npm-production"}},"1.1.2":{"name":"@a11y-oracle/focus-analyzer","version":"1.1.2","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.1.2","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"9674d124f3cd7a24e1ad05371f752ed44fcf0c22","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.1.2.tgz","fileCount":17,"integrity":"sha512-nMnG/QIqh+UjR4Rx1Ix/8ta6gw3J5oJQAdVaWKVyA2KqhbMqDI4syR/Aom1s61sdMKtrS693lL2D4VKk5zn70A==","signatures":[{"sig":"MEQCIHaIP7FcekIJo24DosqwY7ncgfamm5DoaPbNHIbLEn/hAiA4X8OBd1yMTuxwst/RjZ58oOAjWr2rcIjYGCOvqzci3w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38692},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"0e3e6b7fb933fe4ec494e85abe5c056eff06eaef","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.1.2","@a11y-oracle/keyboard-engine":"1.1.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.1.2_1772725932366_0.8733968576150821","host":"s3://npm-registry-packages-npm-production"}},"1.1.3":{"name":"@a11y-oracle/focus-analyzer","version":"1.1.3","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.1.3","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"4726204a929baba7172efec8973df25e55bb7f50","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.1.3.tgz","fileCount":17,"integrity":"sha512-8cUts73YjMkwL/b2tosyB7u1UGMlgraCNRMMeyrIZE7W5sfjT4XFk+hxj1lBvKZ+dQ9Ytpri6yW73AUNdmaXqQ==","signatures":[{"sig":"MEQCIERvmTxUUK6Jhbm522x7YDsJuY6cyZFChOZVmp4BtC/CAiBwFYkNNnteVNMEa9DL5OV87qbXzfFRsNduefqVqmJFxw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38692},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"3fb17cb54b310cb99259d6b25de170f2a09c22f9","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.1.3","@a11y-oracle/keyboard-engine":"1.1.3"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.1.3_1772729080779_0.5367063337230069","host":"s3://npm-registry-packages-npm-production"}},"1.1.4":{"name":"@a11y-oracle/focus-analyzer","version":"1.1.4","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.1.4","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"d40da649a0c86bc2a3145259b1042e250f6059b7","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.1.4.tgz","fileCount":17,"integrity":"sha512-3HRVb6ahrnXSy9CbQEvNMBO/8hM/aevtSGj+7BlN36QFn17gmYtySarDpr0J0NTgNY8JWXtGsRfDncR1sp8MpQ==","signatures":[{"sig":"MEUCIBy7xA/AeBpOkcbY1d+pjhqA9WRG7JT9mgBF0JImeoTeAiEA475CR5qZ/CVNuOjNpGn5qvpCE/0r6+v8wciaDHKqSpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38692},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"2e2f62c8fd8a54c1bb0f9b709647ff4fe8557c27","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.1.4","@a11y-oracle/keyboard-engine":"1.1.4"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.1.4_1772745607516_0.0849135769317011","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@a11y-oracle/focus-analyzer","version":"1.2.0","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.2.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"7006b7390459ce8a3b00d8d4848419d9910d52e9","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.2.0.tgz","fileCount":17,"integrity":"sha512-DFMO8L4j5nNch+Z6WnjJ92PFuudoabQlX/kHK5Fw8/xj/YcS3opJNVfAfUJ8Q8hk1NkWqUhqj/qqsAfRoDAXcw==","signatures":[{"sig":"MEUCIHWWCF0E0vuU+2qC5e2+FW6de9pHDGREiRSMiIdUM3+8AiEA0H/J8LdISuCus0utZlih72hswLlBDC7tZ1+dursFO6c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38867},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"43adb7fc2be7245cbb136e07b24200d68cba1744","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.2.0","@a11y-oracle/keyboard-engine":"1.2.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.2.0_1772753719995_0.26991855841747747","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@a11y-oracle/focus-analyzer","version":"1.3.0","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.3.0","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"a878192664d0814c633f8d0006798d99a5b5c8f4","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.3.0.tgz","fileCount":17,"integrity":"sha512-XWvUxXp8nGKUSebSUgzd04z0nS9nXMArFU6NcidqQrkKqveuQqyOmtGF00YgtO0gHO3d8S+XoHqIVNgxdKjGzw==","signatures":[{"sig":"MEUCIQDpvFEQ8UuA1E+9ND3SqCeiEZgF9f8DGobgz0E+D8veyQIgJEoCq8gAV1MzX19RYTIVy/8oeZJQsTqGBlfZdN2K1j4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38867},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"4295fc44cee8a657989d667355836590231cf754","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.3.0","@a11y-oracle/keyboard-engine":"1.3.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.3.0_1772769822583_0.8957703815854108","host":"s3://npm-registry-packages-npm-production"}},"1.3.1":{"name":"@a11y-oracle/focus-analyzer","version":"1.3.1","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"author":{"name":"a11y-oracle"},"license":"MIT","_id":"@a11y-oracle/focus-analyzer@1.3.1","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"dist":{"shasum":"b1110c1c0a79d9c84441b4f1d14a06d71cdad215","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.3.1.tgz","fileCount":17,"integrity":"sha512-0aauY4Z6wGDZGNKPzZvRMp/s/6Drp7zp+ihm+DW0lzmWH21naO9n8wTgB9qrAmxn5v6fqIne9iHIpM+82z11yQ==","signatures":[{"sig":"MEQCIDndH5QaLCh8G9A9m1XhWU0XYrVps7tUBU+3FHTFy15KAiBo+SyKNuzYnpPtfXtOE1wUEP4ZQhDk6GNGl9JRxlUI1A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38867},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"},"./package.json":"./package.json"},"gitHead":"1cdf8cb41af6392ea299d37eed4bf536788a802f","_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"repository":{"url":"git+https://github.com/a11y-oracle/a11y-oracle.git","type":"git","directory":"libs/focus-analyzer"},"_npmVersion":"11.6.0","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","directories":{},"_nodeVersion":"24.10.0","dependencies":{"tslib":"^2.3.0","@a11y-oracle/cdp-types":"1.3.1","@a11y-oracle/keyboard-engine":"1.3.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/focus-analyzer_1.3.1_1773187235722_0.025296525933603542","host":"s3://npm-registry-packages-npm-production"}},"1.3.2":{"name":"@a11y-oracle/focus-analyzer","version":"1.3.2","description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","license":"MIT","author":{"name":"a11y-oracle"},"repository":{"type":"git","url":"git+https://github.com/a11y-oracle/a11y-oracle.git","directory":"libs/focus-analyzer"},"bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"publishConfig":{"access":"public"},"type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{"./package.json":"./package.json",".":{"types":"./dist/index.d.ts","import":"./dist/index.js","default":"./dist/index.js"}},"dependencies":{"@a11y-oracle/cdp-types":"1.3.2","@a11y-oracle/keyboard-engine":"1.3.2","tslib":"^2.3.0"},"_id":"@a11y-oracle/focus-analyzer@1.3.2","gitHead":"58b2a6611a5150328c96c3d8695e0b14bc5d2d27","_nodeVersion":"24.10.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-v9r7LVUxt+HKCAZnZMvzuNgv01cU+uevIBwcbPjyMiQQQQMJDnhUlLoj8QEO++ftKut4prFJ/mpoZw7ccU/D0A==","shasum":"87e4049315e0ede1686fd0b4c1e543f8b5226a22","tarball":"https://registry.npmjs.org/@a11y-oracle/focus-analyzer/-/focus-analyzer-1.3.2.tgz","fileCount":17,"unpackedSize":38867,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC9JHbjWxnmnIVMgM4tOD0ejFzHYzU0vz1UiUNMn7DRZAIhANjybkHq4RXd524EjV7inikodeQTRRRJJiBvd77RQioO"}]},"_npmUser":{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"},"directories":{},"maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/focus-analyzer_1.3.2_1773294437476_0.38779294462780656"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-04T19:25:03.932Z","modified":"2026-03-12T05:47:17.745Z","1.0.0":"2026-03-04T19:25:04.195Z","1.1.0":"2026-03-05T04:47:54.805Z","1.1.1":"2026-03-05T05:54:18.779Z","1.1.2":"2026-03-05T15:52:12.524Z","1.1.3":"2026-03-05T16:44:40.924Z","1.1.4":"2026-03-05T21:20:07.666Z","1.2.0":"2026-03-05T23:35:20.145Z","1.3.0":"2026-03-06T04:03:42.748Z","1.3.1":"2026-03-11T00:00:35.880Z","1.3.2":"2026-03-12T05:47:17.603Z"},"bugs":{"url":"https://github.com/a11y-oracle/a11y-oracle/issues"},"author":{"name":"a11y-oracle"},"license":"MIT","homepage":"https://github.com/a11y-oracle/a11y-oracle/tree/main/libs/focus-analyzer","keywords":["accessibility","a11y","focus","wcag","keyboard-trap","contrast","testing"],"repository":{"type":"git","url":"git+https://github.com/a11y-oracle/a11y-oracle.git","directory":"libs/focus-analyzer"},"description":"Focus indicator CSS analysis (WCAG 2.4.12), tab order extraction, and keyboard trap detection","maintainers":[{"name":"pjlamb12","email":"preston.j.lamb@gmail.com"}],"readme":"# @a11y-oracle/focus-analyzer\n\nFocus state analysis for accessibility testing. Provides visual focus indicator inspection, WCAG contrast ratio calculation, DOM tab order extraction, and keyboard trap detection.\n\nThis is a low-level building block used internally by `@a11y-oracle/core-engine`. Most users should use the Playwright or Cypress plugin instead.\n\n## Installation\n\n```bash\nnpm install @a11y-oracle/focus-analyzer\n```\n\n## Usage\n\n```typescript\nimport { FocusAnalyzer } from '@a11y-oracle/focus-analyzer';\n\nconst analyzer = new FocusAnalyzer(cdpSession);\n\n// Analyze the focus indicator on the currently focused element\nconst indicator = await analyzer.getFocusIndicator();\nconsole.log(indicator.isVisible);     // true\nconsole.log(indicator.contrastRatio); // 12.63\nconsole.log(indicator.meetsWCAG_AA);  // true (visible + contrast >= 3.0)\nconsole.log(indicator.outlineColor);  // \"rgb(0, 95, 204)\"\nconsole.log(indicator.outlineWidth);  // \"3px\"\n\n// Extract all tabbable elements in DOM tab order\nconst entries = await analyzer.getTabOrder();\nentries.forEach(e => {\n  console.log(`${e.index}: ${e.tag}#${e.id} (tabIndex=${e.tabIndex})`);\n});\n\n// Detect keyboard traps (WCAG 2.1.2)\nconst result = await analyzer.detectKeyboardTrap('#modal-container', 20);\nif (result.isTrapped) {\n  console.log('Focus is trapped!');\n} else {\n  console.log(`Focus escaped to: ${result.escapeElement?.tag}`);\n}\n```\n\n## API Reference\n\n### `FocusAnalyzer`\n\n#### `constructor(cdp: CDPSessionLike)`\n\nCreate a new focus analyzer. Internally creates a `KeyboardEngine` for trap detection.\n\n- `cdp` — Any CDP-compatible session (uses the `CDPSessionLike` interface from `@a11y-oracle/cdp-types`).\n\n#### `getFocusIndicator(): Promise<FocusIndicator>`\n\nAnalyze the visual focus indicator of the currently focused element.\n\nExtracts computed CSS properties (`outline`, `box-shadow`, `border-color`, `background-color`) via `Runtime.evaluate`, then calculates the contrast ratio of the focus indicator against the background.\n\nReturns a default \"not visible\" indicator if no element has focus.\n\n**Visibility detection:**\n- An element has a visible **outline** if `outline-width` is not `0px` and the outline color has a non-zero alpha channel (detects both the `transparent` keyword and `rgba(0, 0, 0, 0)` which Chrome reports for transparent outlines)\n- An element has a visible **box-shadow** if `box-shadow` is not `none`\n\n**Contrast calculation:**\n- For outlines: contrast ratio between `outline-color` and `background-color`\n- For box-shadows: extracts all colors from the `box-shadow` value, filters out transparent ones, and uses the **outermost visible color** (last non-transparent) for contrast calculation. This correctly handles Tailwind CSS multi-ring patterns where the decorative spacer ring appears first and the actual focus indicator ring appears last.\n- Returns `contrastRatio: null` if colors cannot be reliably parsed (e.g., gradients, complex color functions)\n\n**WCAG 2.4.12 AA compliance:** `meetsWCAG_AA` is `true` when the indicator is visible AND the contrast ratio >= 3.0.\n\n#### `getTabOrder(): Promise<TabOrderEntry[]>`\n\nExtract all tabbable elements from the DOM in tab order.\n\nQueries for focusable elements (`a[href]`, `button:not([disabled])`, `input:not([disabled])`, `select:not([disabled])`, `textarea:not([disabled])`, `[tabindex]`), then filters out:\n- Elements with `tabIndex < 0`\n- Hidden elements (`display: none`, `visibility: hidden`)\n- Elements with no layout (`offsetParent === null`)\n- Elements inside `[inert]` containers\n\nResults are sorted by `tabIndex` value: positive `tabIndex` values first (ascending), then `tabIndex=0` elements in DOM order.\n\n#### `detectKeyboardTrap(selector: string, maxTabs?: number): Promise<TraversalResult>`\n\nDetect whether focus is trapped inside a container (WCAG 2.1.2).\n\n1. Focuses the first tabbable element inside the container matching `selector`\n2. Presses Tab repeatedly (up to `maxTabs`, default 50)\n3. After each Tab, checks whether focus has left the container\n4. Returns immediately if focus escapes, or declares a trap if `maxTabs` is exhausted\n\nReturns `{ isTrapped: false, tabCount: 0 }` if the container doesn't exist or has no focusable elements.\n\n### Pure Utility Functions\n\nThe package also exports pure functions for color parsing and WCAG contrast calculation:\n\n#### `parseColor(css: string): RGBColor | null`\n\nParse a CSS color string to an `RGBColor` object. Supports:\n- `rgb(r, g, b)` and `rgba(r, g, b, a)`\n- Hex colors: `#RGB`, `#RRGGBB`, `#RRGGBBAA`\n- `transparent` (returns `{ r: 0, g: 0, b: 0, a: 0 }`)\n\nReturns `null` for unsupported formats (named colors, `hsl()`, `color()`, etc.).\n\n#### `srgbToLinear(channel: number): number`\n\nConvert an sRGB channel value (0-255) to linear light.\n\n#### `relativeLuminance(color: RGBColor): number`\n\nCalculate WCAG relative luminance: `L = 0.2126*R + 0.7152*G + 0.0722*B`\n\n#### `contrastRatio(color1: RGBColor, color2: RGBColor): number`\n\nCalculate the WCAG contrast ratio between two colors. Returns a value between 1 (identical) and 21 (black on white).\n\n#### `meetsAA(ratio: number): boolean`\n\nCheck if a contrast ratio meets WCAG AA for focus indicators (>= 3.0).\n\n### Types\n\n#### `RGBColor`\n\n```typescript\ninterface RGBColor {\n  r: number; // 0-255\n  g: number; // 0-255\n  b: number; // 0-255\n  a: number; // 0-1\n}\n```\n\n#### `FocusIndicator`\n\nFull focus indicator analysis:\n\n```typescript\ninterface FocusIndicator {\n  isVisible: boolean;\n  outline: string;          // Raw outline shorthand\n  outlineColor: string;     // e.g. \"rgb(0, 95, 204)\"\n  outlineWidth: string;     // e.g. \"3px\"\n  outlineOffset: string;    // e.g. \"0px\"\n  boxShadow: string;        // e.g. \"0px 0px 0px 3px rgb(52, 152, 219)\"\n  borderColor: string;\n  backgroundColor: string;\n  contrastRatio: number | null;\n  meetsWCAG_AA: boolean;\n}\n```\n\n#### `TabOrderEntry`\n\n```typescript\ninterface TabOrderEntry {\n  index: number;     // Position in tab order (0-based)\n  tag: string;       // \"BUTTON\"\n  id: string;\n  textContent: string;\n  tabIndex: number;\n  role: string;\n  rect: { x: number; y: number; width: number; height: number };\n}\n```\n\n#### `TabOrderReport`\n\n```typescript\ninterface TabOrderReport {\n  entries: TabOrderEntry[];\n  totalCount: number;\n}\n```\n\n#### `TraversalResult`\n\n```typescript\ninterface TraversalResult {\n  isTrapped: boolean;                  // true if focus never escaped\n  tabCount: number;                    // Total Tab presses attempted\n  visitedElements: TabOrderEntry[];    // Elements that received focus\n  escapeElement: TabOrderEntry | null; // First element outside container\n}\n```\n\n## Exports\n\n```typescript\nexport { FocusAnalyzer } from '@a11y-oracle/focus-analyzer';\nexport { parseColor } from '@a11y-oracle/focus-analyzer';\nexport { srgbToLinear, relativeLuminance, contrastRatio, meetsAA } from '@a11y-oracle/focus-analyzer';\nexport type { RGBColor, FocusIndicator, TabOrderEntry, TraversalResult, TabOrderReport } from '@a11y-oracle/focus-analyzer';\n```\n\n## Limitations\n\n- **Complex focus indicators** — Gradients, CSS `color-mix()`, and other advanced color functions return `contrastRatio: null` because they cannot be reliably parsed into a single color value.\n- **Keyboard trap detection** — Tests with Tab key only. Intentional focus traps (e.g., modal dialogs) should be tested separately with Escape key navigation.\n- **`tabIndex` ordering** — The tab order extraction follows the standard algorithm (positive `tabIndex` first, then `tabIndex=0` in DOM order), but doesn't account for Shadow DOM boundaries.\n","readmeFilename":"README.md"}