{"_id":"@blazefw/a11y","_rev":"6-aec7e44e21434eb4202e3803da67f6b9","name":"@blazefw/a11y","dist-tags":{"latest":"0.1.5"},"versions":{"0.1.0":{"name":"@blazefw/a11y","version":"0.1.0","_id":"@blazefw/a11y@0.1.0","maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"bin":{"nexus-a11y":"bin/nexus-a11y.mjs"},"dist":{"shasum":"6019077819bb85bfb028c8db1df8f639bc2473d2","tarball":"https://registry.npmjs.org/@blazefw/a11y/-/a11y-0.1.0.tgz","fileCount":25,"integrity":"sha512-MvknZ2fmNkroE2/F3mFXAnipPu408FvVC7eaE7Hu1E1bFkShMt/ClqTUbvtXy7W9eAk1EKlYy3alC5LcEhLJMw==","signatures":[{"sig":"MEUCIExvXYT0Drm5Z9VbT9VWVBoEQGXqb7Z3IJuzdhoq5aiIAiEA6Vn/NqNl1pBmWpyH3czAs51aFbKxxn0Fg5PQ4Vn/1eM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":83465},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test":{"types":"./dist/test/index.d.ts","import":"./dist/test/index.js"}},"gitHead":"0ce5dd4f4e4eb9e7f572b1f4d41b76917fbde30f","scripts":{"dev":"tsc --watch","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=src","build":"tsc"},"_npmUser":{"name":"bosepackages","email":"bosechandan21@gmail.com"},"deprecated":"Superseded by the 0.1.3 coordinated re-release. Install ^0.1.3 (some 0.1.1 packages are uninstallable due to unrewritten workspace: deps).","_npmVersion":"11.6.2","description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and nexus-a11y compliance CLI","directories":{},"_nodeVersion":"24.12.0","dependencies":{"jsdom":"^25.0.0","axe-core":"^4.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","react":"^18.3.1","ts-jest":"^29.0.0","react-dom":"^18.3.1","typescript":"^5.4.0","@types/jest":"^29.0.0","@types/node":"^22.0.0","@types/jsdom":"^21.0.0","@types/react":"^18","@jest/globals":"^30.3.0","@types/react-dom":"^18","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/user-event":"^14.0.0"},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"_npmOperationalInternal":{"tmp":"tmp/a11y_0.1.0_1774837134425_0.5182106842863585","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@blazefw/a11y","version":"0.1.1","_id":"@blazefw/a11y@0.1.1","maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"bin":{"nexus-a11y":"bin/nexus-a11y.mjs"},"dist":{"shasum":"5408eef3b96fb22382997d1c414f13404abfb22d","tarball":"https://registry.npmjs.org/@blazefw/a11y/-/a11y-0.1.1.tgz","fileCount":26,"integrity":"sha512-kPLhlev08Gp9EETWnF3nO2HP805m03oxyPMHnSVUcdABnEJGmQvW08U+Fwj9yaioqaXf8ZbLqvzr44qRVo7+bA==","signatures":[{"sig":"MEYCIQDn5nOqwdmH1gNtmwRmD5K09wHj0SyQVT9tk1J7taq4SAIhANABD+e4NENUPzjE5MI0VKFkKPtA3vg6EvG68reLjUpB","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":89848},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test":{"types":"./dist/test/index.d.ts","import":"./dist/test/index.js"}},"gitHead":"198abf8db351957e84489c8bcdcf1a2d8c18097d","scripts":{"dev":"tsc --watch","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=src","build":"tsc"},"_npmUser":{"name":"bosepackages","email":"bosechandan21@gmail.com"},"deprecated":"Superseded by the 0.1.3 coordinated re-release. Install ^0.1.3 (some 0.1.1 packages are uninstallable due to unrewritten workspace: deps).","_npmVersion":"11.6.2","description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and nexus-a11y compliance CLI","directories":{},"_nodeVersion":"24.12.0","dependencies":{"jsdom":"^25.0.0","axe-core":"^4.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","react":"^18.3.1","ts-jest":"^29.0.0","react-dom":"^18.3.1","typescript":"^5.4.0","@types/jest":"^29.0.0","@types/node":"^22.0.0","@types/jsdom":"^21.0.0","@types/react":"^18","@jest/globals":"^30.3.0","@types/react-dom":"^18","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/user-event":"^14.0.0"},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"_npmOperationalInternal":{"tmp":"tmp/a11y_0.1.1_1774838352634_0.17905633553262934","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@blazefw/a11y","version":"0.1.2","_id":"@blazefw/a11y@0.1.2","maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"bin":{"nexus-a11y":"bin/nexus-a11y.mjs"},"dist":{"shasum":"852e34e0202d351c1fc99271bc3a3d5a82e21f41","tarball":"https://registry.npmjs.org/@blazefw/a11y/-/a11y-0.1.2.tgz","fileCount":72,"integrity":"sha512-0kQo89Gr3/dAs9hCq+4dSj07fC6D148gKVebxnAVgokmPuNZsoPgAPgLJLlsdrKfs7YjgztqbhbQsALa9JEb9g==","signatures":[{"sig":"MEUCIHjPRP4K+XfcTfWhYCEODh9ZXoFRHhKbIuqOcZcJoE9sAiEAlrMAAS7sYDjTJwAKwzS7QtxNY9e2K6zrAVuhh2spndE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":259049},"main":"./dist/index.js","type":"module","_from":"file:blazefw-a11y-0.1.2.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test":{"types":"./dist/test/index.d.ts","import":"./dist/test/index.js"}},"scripts":{"dev":"tsc --watch","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=src","build":"tsc"},"_npmUser":{"name":"bosepackages","email":"bosechandan21@gmail.com"},"_resolved":"C:\\Users\\Asus\\AppData\\Local\\Temp\\d397ed69cdeae11e7dba7fd123c5a385\\blazefw-a11y-0.1.2.tgz","_integrity":"sha512-0kQo89Gr3/dAs9hCq+4dSj07fC6D148gKVebxnAVgokmPuNZsoPgAPgLJLlsdrKfs7YjgztqbhbQsALa9JEb9g==","deprecated":"Superseded by the 0.1.3 coordinated re-release. Install ^0.1.3 (some 0.1.1 packages are uninstallable due to unrewritten workspace: deps).","_npmVersion":"11.12.1","description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and nexus-a11y compliance CLI","directories":{},"_nodeVersion":"24.12.0","dependencies":{"jsdom":"^25.0.0","axe-core":"^4.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","react":"^18.3.1","ts-jest":"^29.0.0","react-dom":"^18.3.1","typescript":"^5.4.0","@types/jest":"^29.0.0","@types/node":"^22.0.0","@types/jsdom":"^21.0.0","@types/react":"^18","@jest/globals":"^30.3.0","@types/react-dom":"^18","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/user-event":"^14.0.0"},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"_npmOperationalInternal":{"tmp":"tmp/a11y_0.1.2_1778518193758_0.3512281794186429","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@blazefw/a11y","version":"0.1.3","_id":"@blazefw/a11y@0.1.3","maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"bin":{"blazefw-a11y":"bin/blazefw-a11y.mjs"},"dist":{"shasum":"3168d4f7a0d2a7e8eff375692e0380041b762e5a","tarball":"https://registry.npmjs.org/@blazefw/a11y/-/a11y-0.1.3.tgz","fileCount":76,"integrity":"sha512-7mI6+RZZ/1P5RUu5TM31ebDOkLSvS99vCSOMMY30riLh+QLas39S7Kn4quFjQWJFxkcav+68Yl8+RnBk7NehJQ==","signatures":[{"sig":"MEUCIQC+NC0TppLa50CprlOomvsyUEHaGYzS+UGHtxRCPz7jBwIgOI0GBc9mlg9QOpPvTVw1idjPinUScqE4IdjRwRcT7hE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":262632},"main":"./dist/index.js","type":"module","_from":"file:blazefw-a11y-0.1.3.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./test":{"types":"./dist/test/index.d.ts","import":"./dist/test/index.js"}},"scripts":{"dev":"tsc --watch","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=src","build":"tsc"},"_npmUser":{"name":"bosepackages","email":"bosechandan21@gmail.com"},"_resolved":"C:\\Users\\Asus\\AppData\\Local\\Temp\\4e5c0e044a7dd03d94316bcfb17e11ac\\blazefw-a11y-0.1.3.tgz","_integrity":"sha512-7mI6+RZZ/1P5RUu5TM31ebDOkLSvS99vCSOMMY30riLh+QLas39S7Kn4quFjQWJFxkcav+68Yl8+RnBk7NehJQ==","_npmVersion":"11.12.1","description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and blazefw-a11y compliance CLI","directories":{},"_nodeVersion":"24.12.0","dependencies":{"jsdom":"^25.0.0","axe-core":"^4.7.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.0.0","react":"^18.3.1","ts-jest":"^29.0.0","react-dom":"^18.3.1","typescript":"^5.4.0","@types/jest":"^29.0.0","@types/node":"^22.0.0","@types/jsdom":"^21.0.0","@types/react":"^18","@jest/globals":"^30.3.0","@types/react-dom":"^18","@testing-library/react":"^14.0.0","jest-environment-jsdom":"^29.0.0","@testing-library/jest-dom":"^6.0.0","@testing-library/user-event":"^14.0.0"},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"_npmOperationalInternal":{"tmp":"tmp/a11y_0.1.3_1778521608406_0.4575804080916104","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@blazefw/a11y","version":"0.1.5","type":"module","description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and blazefw-a11y compliance CLI","main":"./dist/index.js","types":"./dist/index.d.ts","bin":{"blazefw-a11y":"bin/blazefw-a11y.mjs"},"exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"},"./test":{"import":"./dist/test/index.js","types":"./dist/test/index.d.ts"}},"peerDependencies":{"react":"^18 || ^19","react-dom":"^18 || ^19"},"dependencies":{"axe-core":"^4.7.0","jsdom":"^25.0.0"},"devDependencies":{"@jest/globals":"^30.3.0","@testing-library/jest-dom":"^6.0.0","@testing-library/react":"^14.0.0","@testing-library/user-event":"^14.0.0","@types/jest":"^29.0.0","@types/jsdom":"^21.0.0","@types/node":"^22.0.0","@types/react":"^18","@types/react-dom":"^18","jest":"^29.0.0","jest-environment-jsdom":"^29.0.0","react":"^18.3.1","react-dom":"^18.3.1","ts-jest":"^29.0.0","typescript":"^5.4.0"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc","dev":"tsc --watch","test":"node --experimental-vm-modules node_modules/jest/bin/jest.js --testPathPattern=src"},"_id":"@blazefw/a11y@0.1.5","_integrity":"sha512-uoFWfPI1VrmlbgiZdsDa5AGMX1yLEKgJkD6ZKFDmyUfAEO0RSHsS8P7g3xDhQSuPViBL6vfyKnDXyJyo+G0N4g==","_resolved":"C:\\Users\\Asus\\AppData\\Local\\Temp\\8fd3dcf215eae0f837b607d2ca124c03\\blazefw-a11y-0.1.5.tgz","_from":"file:blazefw-a11y-0.1.5.tgz","_nodeVersion":"24.12.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-uoFWfPI1VrmlbgiZdsDa5AGMX1yLEKgJkD6ZKFDmyUfAEO0RSHsS8P7g3xDhQSuPViBL6vfyKnDXyJyo+G0N4g==","shasum":"d13c9afc9d8454d9e736b2502a824dc7936eb569","tarball":"https://registry.npmjs.org/@blazefw/a11y/-/a11y-0.1.5.tgz","fileCount":76,"unpackedSize":262562,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDfMy8WKeqMymQHBCQU+au6+X+5hiWygNn5FhGudqAdoQIhAPaBd6e7uT6mxrU4/dprnxJG66gJtzmmIrlWvfjvY5v4"}]},"_npmUser":{"name":"bosepackages","email":"bosechandan21@gmail.com"},"directories":{},"maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/a11y_0.1.5_1778523565131_0.21060275953024155"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-30T02:18:54.330Z","modified":"2026-05-11T18:19:25.432Z","0.1.0":"2026-03-30T02:18:54.578Z","0.1.1":"2026-03-30T02:39:12.786Z","0.1.2":"2026-05-11T16:49:53.911Z","0.1.3":"2026-05-11T17:46:48.574Z","0.1.5":"2026-05-11T18:19:25.303Z"},"description":"Blazefw Accessibility — runtime utilities, axe-core test helpers, and blazefw-a11y compliance CLI","maintainers":[{"name":"bosepackages","email":"bosechandan21@gmail.com"}],"readme":"# @blazefw/a11y\n\nBlazeFW Accessibility — runtime utilities for focus management, screen reader announcements, skip navigation, and motion preferences. Includes `@blazefw/a11y/test` with axe-core helpers for Jest, and the `blazefw-a11y` CLI for WCAG 2.1 AA compliance reporting.\n\n## Installation\n\n```bash\nnpm install @blazefw/a11y\n# peer dependencies\nnpm install react react-dom\n```\n\n## Runtime utilities\n\n### `useFocusTrap(ref, options?)`\n\nTraps keyboard focus inside a container — essential for modals, drawers, and dialogs. Restores focus to the previously-active element on unmount.\n\n```tsx\nimport { useRef } from 'react';\nimport { useFocusTrap } from '@blazefw/a11y';\n\nfunction Modal({ isOpen, onClose, children }) {\n  const ref = useRef<HTMLDivElement>(null);\n\n  useFocusTrap(ref, {\n    enabled: isOpen,\n    onEscape: onClose,   // called when user presses Escape\n  });\n\n  return (\n    <div ref={ref} role=\"dialog\" aria-modal=\"true\">\n      {children}\n    </div>\n  );\n}\n```\n\nTab and Shift+Tab cycle through all focusable elements inside the container. Elements with `[disabled]` or `[inert]` are excluded automatically.\n\n### `useAnnouncer(options?)`\n\nSends messages to a live ARIA region — screen readers read the message aloud without moving focus. Useful for async status updates, form validation, and notifications.\n\n```tsx\nimport { useAnnouncer } from '@blazefw/a11y';\n\nfunction SaveButton() {\n  const { announce } = useAnnouncer({ politeness: 'polite' }); // or 'assertive'\n\n  async function handleSave() {\n    await save();\n    announce('Changes saved successfully');\n  }\n\n  return <button onClick={handleSave}>Save</button>;\n}\n```\n\nThe announcer injects a visually-hidden `aria-live` div directly into `document.body` (stable across re-renders). Repeating the same message still triggers a screen reader announcement.\n\n### `SkipNavLink` / `SkipNavContent`\n\nAdds a \"Skip to main content\" link — required for WCAG 2.4.1. Visually hidden until focused, then appears at the top of the page.\n\n```tsx\nimport { SkipNavLink, SkipNavContent } from '@blazefw/a11y';\n\n// In your layout header:\n<header>\n  <SkipNavLink />\n  <nav>...</nav>\n</header>\n\n// At the start of your main content:\n<main>\n  <SkipNavContent />\n  <h1>Page title</h1>\n  ...\n</main>\n```\n\nCustom label and target:\n\n```tsx\n<SkipNavLink label=\"Skip to search results\" contentId=\"results\" />\n<SkipNavContent id=\"results\" />\n```\n\n### `useReducedMotion()`\n\nReturns `true` when the user has enabled \"Reduce Motion\" in their OS preferences. Use to disable or simplify animations.\n\n```tsx\nimport { useReducedMotion } from '@blazefw/a11y';\n\nfunction AnimatedCard({ children }) {\n  const reduced = useReducedMotion();\n\n  return (\n    <div style={{\n      transition: reduced ? 'none' : 'transform 300ms ease',\n      transform: reduced ? 'none' : isVisible ? 'translateY(0)' : 'translateY(20px)',\n    }}>\n      {children}\n    </div>\n  );\n}\n```\n\n### `VisuallyHidden`\n\nRenders content that is invisible to sighted users but readable by screen readers. Better than `display: none` or `visibility: hidden` which hide from all users.\n\n```tsx\nimport { VisuallyHidden } from '@blazefw/a11y';\n\n// Add context to icon-only buttons\n<button onClick={onClose}>\n  <CloseIcon aria-hidden />\n  <VisuallyHidden>Close dialog</VisuallyHidden>\n</button>\n\n// Use any HTML element\n<VisuallyHidden as=\"span\">Loading results...</VisuallyHidden>\n```\n\n---\n\n## Test utilities — `@blazefw/a11y/test`\n\naxe-core integration for Jest + jsdom. Drop-in helpers for accessibility audits in unit tests.\n\n```bash\nnpm install -D @blazefw/a11y axe-core\n```\n\n```ts\nimport { renderWithA11y, expectNoViolations, runA11yAudit } from '@blazefw/a11y/test';\n\ndescribe('LoginForm', () => {\n  it('has no accessibility violations', async () => {\n    const { container } = renderWithA11y(<LoginForm />);\n    await expectNoViolations(container);\n  });\n\n  it('reports violations for debugging', async () => {\n    const { container } = renderWithA11y(<BadComponent />);\n    const violations = await runA11yAudit(container);\n    console.log(formatViolations(violations));\n  });\n});\n```\n\n**Exports:**\n\n```ts\nimport {\n  runA11yAudit,         // runs axe-core, returns violations array\n  expectNoViolations,   // throws jest assertion if violations found\n  renderWithA11y,       // wraps @testing-library/react's render\n  formatViolations,     // formats violations as human-readable string\n} from '@blazefw/a11y/test';\n```\n\n---\n\n## `blazefw-a11y` CLI\n\nAudits an HTML file or URL for WCAG 2.1 AA compliance. Reports axe-core violations, a manual checklist for the ~40% of rules that cannot be automated, and a WCAG coverage table.\n\n### Usage\n\n```bash\n# Audit an HTML file\nnpx blazefw-a11y audit --file ./dist/index.html\n\n# Audit a URL (requires a running server)\nnpx blazefw-a11y audit --url http://localhost:3000\n\n# Output formats\nnpx blazefw-a11y audit --file index.html --format json\nnpx blazefw-a11y audit --file index.html --format table   # default\n```\n\n### Example output\n\n```\nVIOLATIONS (3 found, sorted by impact)\n────────────────────────────────────────\n[critical] image-alt       — <img> elements must have alt text          (2 elements)\n[serious]  label           — Form elements must have labels              (1 element)\n[moderate] color-contrast  — Elements must meet contrast ratio threshold (4 elements)\n\nMANUAL CHECKLIST (20 items)\n────────────────────────────────────────\n□ 1.2.2  Captions (Prerecorded)   — Check all videos have accurate captions\n□ 1.3.3  Sensory Characteristics  — Instructions don't rely on shape/colour alone\n...\n\nWCAG 2.1 AA COVERAGE\n────────────────────────────────────────\nPrinciple 1 (Perceivable)   ████████░░  8/10 automated\nPrinciple 2 (Operable)      ██████░░░░  6/10 automated\nPrinciple 3 (Understandable)████░░░░░░  4/10 automated\nPrinciple 4 (Robust)        ██████████  10/10 automated\n\nSUMMARY: 3 violations, 44/50 WCAG criteria checked (automated)\n```\n\n### Exit codes\n\n| Code | Meaning |\n|---|---|\n| `0` | No violations found |\n| `1` | One or more violations found |\n| `2` | CLI usage error |\n","readmeFilename":"README.md"}