{"_id":"@a11yst/source-mapping-html","_rev":"3-5a5bbbd79da22199d7abaf4ebc352b7e","name":"@a11yst/source-mapping-html","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"@a11yst/source-mapping-html","version":"1.0.0","license":"MPL-2.0","_id":"@a11yst/source-mapping-html@1.0.0","maintainers":[{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"}],"homepage":"https://github.com/angelabenavente/a11yst#readme","bugs":{"url":"https://github.com/angelabenavente/a11yst/issues"},"dist":{"shasum":"b6f157acb4f1e3674c8566c51cb685782aec5d02","tarball":"https://registry.npmjs.org/@a11yst/source-mapping-html/-/source-mapping-html-1.0.0.tgz","fileCount":47,"integrity":"sha512-rEGUPILBWDsoai9Mkg9y08ODA3PpUrjR3GV/XNQ1NOm+6haR5socIOAiUiGBBgsSnBULFLdJ5hdb1ZIzHbsS+Q==","signatures":[{"sig":"MEYCIQD5lEMWCQ17FXSUMcg+EQUgkjtkW3k9DEAT0/SV63ratgIhAKNtyTtpXES09Jvd5rhCJVo+gNXeigwSF+hRpxAhAAo5","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113160},"main":"./dist/index.js","type":"module","_from":"file:a11yst-source-mapping-html-1.0.0.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist *.tsbuildinfo","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"},"_resolved":"/private/var/folders/tf/l5jz90dj0yncc_ds04tbfs5c0000gn/T/2357f24b8e7dc397a5803edd5ff1b9ed/a11yst-source-mapping-html-1.0.0.tgz","_integrity":"sha512-rEGUPILBWDsoai9Mkg9y08ODA3PpUrjR3GV/XNQ1NOm+6haR5socIOAiUiGBBgsSnBULFLdJ5hdb1ZIzHbsS+Q==","repository":{"url":"git+https://github.com/angelabenavente/a11yst.git","type":"git"},"_npmVersion":"10.9.0","description":"Conservative HTML static source catalog and mapping for a11yst","directories":{},"_nodeVersion":"22.12.0","dependencies":{"parse5":"^7.2.1","css-what":"^6.1.0","@a11yst/types":"1.0.0","@a11yst/source-index":"1.0.0","@a11yst/source-mapping":"1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/source-mapping-html_1.0.0_1787506254330_0.9431286542177089","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@a11yst/source-mapping-html","version":"1.0.1","license":"MPL-2.0","_id":"@a11yst/source-mapping-html@1.0.1","maintainers":[{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"}],"homepage":"https://github.com/angelabenavente/a11yst#readme","bugs":{"url":"https://github.com/angelabenavente/a11yst/issues"},"dist":{"shasum":"e983889070c3030acfdbb37f2d13a259bc87a831","tarball":"https://registry.npmjs.org/@a11yst/source-mapping-html/-/source-mapping-html-1.0.1.tgz","fileCount":47,"integrity":"sha512-6LHx92rEIFYh+SDQ0U1WeCl93cJAIR8oK9AzaxsgECsNJe+OwCF4CDzdpQKbicjQZyh0tgWv+6msDCo35mWcNA==","signatures":[{"sig":"MEYCIQCsj0ztEKt+OD7AxNABf2cKC/bgKBpVO03px0riLwYuUQIhAKlY4W9kt32IfGCk9Y/g8Q70OxqWiRcs91IInhruSd6a","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":113160},"main":"./dist/index.js","type":"module","_from":"file:a11yst-source-mapping-html-1.0.1.tgz","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json","clean":"rm -rf dist *.tsbuildinfo","typecheck":"tsc -p tsconfig.json --noEmit"},"_npmUser":{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"},"_resolved":"/private/var/folders/tf/l5jz90dj0yncc_ds04tbfs5c0000gn/T/7b3d699ac6897ed5116a1281de843af5/a11yst-source-mapping-html-1.0.1.tgz","_integrity":"sha512-6LHx92rEIFYh+SDQ0U1WeCl93cJAIR8oK9AzaxsgECsNJe+OwCF4CDzdpQKbicjQZyh0tgWv+6msDCo35mWcNA==","repository":{"url":"git+https://github.com/angelabenavente/a11yst.git","type":"git"},"_npmVersion":"10.9.8","description":"Conservative HTML static source catalog and mapping for a11yst","directories":{},"_nodeVersion":"22.23.1","dependencies":{"parse5":"^7.2.1","css-what":"^6.1.0","@a11yst/types":"1.0.1","@a11yst/source-index":"1.0.1","@a11yst/source-mapping":"1.0.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.7.2","@types/node":"^22.10.2"},"_npmOperationalInternal":{"tmp":"tmp/source-mapping-html_1.0.1_1787508682083_0.23775045884134638","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@a11yst/source-mapping-html","version":"1.0.2","description":"Conservative HTML static source catalog and mapping for a11yst","type":"module","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"main":"./dist/index.js","types":"./dist/index.d.ts","dependencies":{"css-what":"^6.1.0","parse5":"^7.2.1","@a11yst/source-index":"1.0.2","@a11yst/source-mapping":"1.0.2","@a11yst/types":"1.0.2"},"devDependencies":{"@types/node":"^22.10.2","typescript":"^5.7.2"},"license":"MPL-2.0","repository":{"type":"git","url":"git+https://github.com/angelabenavente/a11yst.git"},"homepage":"https://www.a11yst.dev","bugs":{"url":"https://github.com/angelabenavente/a11yst/issues"},"publishConfig":{"access":"public"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","clean":"rm -rf dist *.tsbuildinfo"},"_id":"@a11yst/source-mapping-html@1.0.2","_integrity":"sha512-TuUkaDzp/tjwEMgCw8DYfc3U40VkbKRVemJ1f2TMoNZWO2J6YP0I/9gRKFOVvD/Opva2uPwN97fZAjRaEOQFeg==","_resolved":"/private/var/folders/tf/l5jz90dj0yncc_ds04tbfs5c0000gn/T/4168676a5eee679466c90c20fac8d3fc/a11yst-source-mapping-html-1.0.2.tgz","_from":"file:a11yst-source-mapping-html-1.0.2.tgz","_nodeVersion":"22.23.1","_npmVersion":"10.9.8","dist":{"integrity":"sha512-TuUkaDzp/tjwEMgCw8DYfc3U40VkbKRVemJ1f2TMoNZWO2J6YP0I/9gRKFOVvD/Opva2uPwN97fZAjRaEOQFeg==","shasum":"e0432c70eb711cf4b52fede850223606161ea6c4","tarball":"https://registry.npmjs.org/@a11yst/source-mapping-html/-/source-mapping-html-1.0.2.tgz","fileCount":47,"unpackedSize":113528,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIA2u7fyDPqND9OBkd8ihkAKzosvr2rmJJJwtFR385PsKAiEAv/XF34O+GAfRYgkxatbwWgktt/tMDMKQbu0d8rrK1wk="}]},"_npmUser":{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"},"directories":{},"maintainers":[{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/source-mapping-html_1.0.2_1787683121355_0.18189840840963356"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-23T17:30:54.083Z","modified":"2026-08-25T18:38:41.657Z","1.0.0":"2026-08-23T17:30:54.515Z","1.0.1":"2026-08-23T18:11:22.242Z","1.0.2":"2026-08-25T18:38:41.517Z"},"bugs":{"url":"https://github.com/angelabenavente/a11yst/issues"},"license":"MPL-2.0","homepage":"https://www.a11yst.dev","repository":{"type":"git","url":"git+https://github.com/angelabenavente/a11yst.git"},"description":"Conservative HTML static source catalog and mapping for a11yst","maintainers":[{"name":"angelabenavente","email":"ang.ben.dev@gmail.com"}],"readme":"# @a11yst/source-mapping-html [![NPM version](https://img.shields.io/npm/v/@a11yst/source-mapping-html.svg?style=flat)](https://www.npmjs.com/package/@a11yst/source-mapping-html) [![License: MPL-2.0](https://img.shields.io/badge/License-MPL--2.0-blue.svg)](LICENSE) [![NPM total downloads](https://img.shields.io/npm/dt/@a11yst/source-mapping-html.svg?style=flat)](https://www.npmjs.com/package/@a11yst/source-mapping-html)\n\nConservative HTML static source catalog and mapping for a11yst Phase **10c**.\n\nThis package maps accessibility evidence from static HTML files to repository-relative\nsource locations. It does **not** execute scripts, open a browser, or integrate with\naudit or reports.\n\n## Scope\n\nSupported:\n\n- Files indexed as `kind: html` (`.html`, `.htm`)\n- Static DOM declared in HTML source\n- Selector, ID, attribute, route, and static text hints\n- Existing validated `sourceLocation` → `exact` via `@a11yst/source-mapping`\n\nNot supported in 10c:\n\n- Angular templates (`*.component.html`) — Phase 10g\n- JSX/React/Next/Vue/Svelte/Astro — Phases 10d–10f\n- JavaScript-generated DOM\n- Full Accessible Name and Description Computation\n- Advanced ranking (Phase 10h) or recommendations (Phase 10i)\n\n## Dependencies\n\n1. `@a11yst/source-index` provides the safe file list — this package never walks the repo.\n2. `parse5` parses HTML with start-tag source locations.\n3. `css-what` parses CSS selectors for conservative matching.\n4. `@a11yst/source-mapping` performs final candidate selection.\n\n## Catalog\n\n`createHtmlSourceCatalog()` reads indexed HTML files only, builds `HtmlSourceElement`\nentries with:\n\n- start-tag `SourceRegion`\n- allowlisted attributes\n- `staticVisibleText` (not guaranteed visible text)\n- `staticAccessibleName` (static hints only, not ACCNAME)\n\nScript/style/template/noscript content is excluded from text extraction and never stored.\n\n## Mapping\n\n`mapHtmlSource()` converts `HtmlSourceMappingEvidence` into `SourceMappingResult`:\n\n| Evidence | Typical outcome |\n| --- | --- |\n| Valid existing source location | `mapped`, `exact` |\n| Unique selector | `mapped`, `high`, `selector-match` |\n| Unique ID | `mapped`, `high`, `static-source-index` |\n| Attribute / text hints | `medium` or `high`, never `exact` |\n| Multiple distinct matches | `ambiguous` |\n| No match | `unmapped` |\n\nRoute values only narrow candidate files; they never produce `exact` confidence.\n\n## Security\n\n- Repository root is explicit and never serialized\n- Symlinks are not followed when reading HTML\n- Secrets, form values, full HTML, scripts, and styles are not stored\n- Diagnostics omit absolute paths and hostile selector/text payloads\n\n## Limits\n\nDefaults:\n\n```typescript\n{\n  maxFiles: 5_000,\n  maxElementsPerFile: 50_000,\n  maxTextLength: 256,\n}\n```\n\nRoot `.gitignore` nested files are **not** interpreted here (handled by `@a11yst/source-index` root policy only).\n\n## Next steps\n\n- **10d**: JSX/React mapping\n- **10h**: advanced ranking\n- **10i**: recommendations\n- **10j**: report integration\n","readmeFilename":"README.md"}