@markuplint/html-spec 5.0.0-rc.2 → 5.0.0-rc.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,63 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [5.0.0-rc.5](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.4...v5.0.0-rc.5) (2026-08-28)
7
+
8
+ ### Bug Fixes
9
+
10
+ - **html-spec:** condition link[disabled] and require title on alternate+stylesheet ([cc56f78](https://github.com/markuplint/markuplint/commit/cc56f78bef8dbc6a1d63cf8acdddab52b86fce76))
11
+ - **html-spec:** div in dl allows exactly one dt+dd group per HTML LS ([6f344bb](https://github.com/markuplint/markuplint/commit/6f344bbc72bc82dbe2d1ebf05600a5fce9838de1))
12
+ - **html-spec:** drop case-insensitive flag from input[name] isindex pattern ([6cd6173](https://github.com/markuplint/markuplint/commit/6cd617379f5c8627e3192e819cf0c9406388da0d))
13
+ - **html-spec:** enforce non-empty title on alternate stylesheet link ([380da48](https://github.com/markuplint/markuplint/commit/380da48eeda19d1d672de466e389f76c373a8848))
14
+ - **html-spec:** enforce script attr applicability table per HTML LS 4.12.1 ([5331d2c](https://github.com/markuplint/markuplint/commit/5331d2cc7bcc6e7038515487f288f9cd00478b20)), closes [#3648](https://github.com/markuplint/markuplint/issues/3648)
15
+ - **html-spec:** forbid aria-expanded / aria-pressed on summary in details ([#3927](https://github.com/markuplint/markuplint/issues/3927)) ([92efa50](https://github.com/markuplint/markuplint/commit/92efa500ff6033d0bb82f816cbc27090afb5dbfe))
16
+ - **html-spec:** forbid input[name="isindex"] ([eb770e8](https://github.com/markuplint/markuplint/commit/eb770e8057a93d8e74da29c1855fb6bdadf47852))
17
+ - **html-spec:** forbid nested svg|a per SVG2 §17.6 ([d18f1bf](https://github.com/markuplint/markuplint/commit/d18f1bf691ecab30482a9e30f52d5196367dedf4))
18
+ - **html-spec:** mark separator aria-valuenow as focusable-conditional ([386b16c](https://github.com/markuplint/markuplint/commit/386b16c82795256224da35c01b95a85dc1ea727f)), closes [#3682](https://github.com/markuplint/markuplint/issues/3682)
19
+ - **html-spec:** preserve deprecated flags dropped by MDN scrape ([#3995](https://github.com/markuplint/markuplint/issues/3995)) ([d38ebfe](https://github.com/markuplint/markuplint/commit/d38ebfe2625102ed53809302b4fc6d67c88a7a9f)), closes [#3981](https://github.com/markuplint/markuplint/issues/3981)
20
+ - **html-spec:** restore deprecated attribute flags lost to MDN's Baseline badge rename ([#4003](https://github.com/markuplint/markuplint/issues/4003)) ([c5c91b5](https://github.com/markuplint/markuplint/commit/c5c91b581606ffb02816fcd784c5b8cc9167c465)), closes [#3994](https://github.com/markuplint/markuplint/issues/3994) [#3995](https://github.com/markuplint/markuplint/issues/3995)
21
+ - **html-spec:** route media= attribute through MediaQueryList type checker ([e86d8c8](https://github.com/markuplint/markuplint/commit/e86d8c88961b4669fe36b7c306b4b0e722abcda4)), closes [#3850](https://github.com/markuplint/markuplint/issues/3850)
22
+ - **html-spec:** tighten itemref uniqueness and itemtype empty handling ([9ba05bf](https://github.com/markuplint/markuplint/commit/9ba05bff5e60df25fd2ac887f32349088e284009))
23
+ - **html-spec:** tighten MathML element content models per MathML Core ([2b1abb4](https://github.com/markuplint/markuplint/commit/2b1abb44d14015c7602d74947eb8f79dde41cf09)), closes [#3844](https://github.com/markuplint/markuplint/issues/3844)
24
+ - **html-spec:** tighten progress[value] lower bound and img[sizes]/srcset pairing ([74ac375](https://github.com/markuplint/markuplint/commit/74ac37541e24269f5ad10f740a7dc0dbe525c45c))
25
+ - **html-spec:** tighten script attribute conditions per HTML LS ([9285373](https://github.com/markuplint/markuplint/commit/92853738945f5b5a998455d48e9a0cddce07566f))
26
+ - **html-spec:** tighten source[sizes] to also require srcset ([71d3dd1](https://github.com/markuplint/markuplint/commit/71d3dd18d22a5b08e7c3ac9900d05f4c2d3af3b5))
27
+ - **html-spec:** tighten URL attribute types and required-attribute markers ([a946b43](https://github.com/markuplint/markuplint/commit/a946b433c28974db90e860dd101a5cfe016f7d1b))
28
+ - **html-spec:** video[poster] is NonEmptyURL (HTML LS §4.8.9) ([ed00089](https://github.com/markuplint/markuplint/commit/ed000898669da831b664a54e26130c57cc40db97))
29
+
30
+ ### Code Refactoring
31
+
32
+ - **rules:** redesign v5 rule system — naming, splits, specConformance ([#3989](https://github.com/markuplint/markuplint/issues/3989)) ([e925565](https://github.com/markuplint/markuplint/commit/e925565ce537848d7d1573369723cbce724a841b)), closes [#4](https://github.com/markuplint/markuplint/issues/4) [#aside-conditional-role-mapping-aria-13](https://github.com/markuplint/markuplint/issues/aside-conditional-role-mapping-aria-13)
33
+
34
+ ### Features
35
+
36
+ - **html-spec:** add shadowrootslotassignment + customelementregistry on template ([96df2ff](https://github.com/markuplint/markuplint/commit/96df2ffb337648ccea0e008c0ca944254e6b2007))
37
+ - **html-spec:** enforce X-UA-Compatible content="IE=edge" ([#3929](https://github.com/markuplint/markuplint/issues/3929)) ([2638fba](https://github.com/markuplint/markuplint/commit/2638fba826a489ad745ee30c4b8ed195b2362403)), closes [#3928](https://github.com/markuplint/markuplint/issues/3928) [#3928](https://github.com/markuplint/markuplint/issues/3928) [#3734](https://github.com/markuplint/markuplint/issues/3734)
38
+ - **html-spec:** forbid aria-expanded on button[popovertarget] ([3bdc265](https://github.com/markuplint/markuplint/commit/3bdc2652519ff106e8b67512bd352be1b6e8fe68)), closes [#3735](https://github.com/markuplint/markuplint/issues/3735)
39
+ - **html-spec:** forbid dir="auto" on bdo per HTML LS ([71bba9e](https://github.com/markuplint/markuplint/commit/71bba9e9f2be556ac3c256d37e035548bd3ccbd2))
40
+ - **html-spec:** harden generator validation and summarize spec changes ([2297699](https://github.com/markuplint/markuplint/commit/229769996539658d4d9a3d76a1bb60df4754490d)), closes [#3894](https://github.com/markuplint/markuplint/issues/3894) [#3897](https://github.com/markuplint/markuplint/issues/3897)
41
+ - **html-spec:** narrow del/ins datetime attribute to DateStringWithOptionalTime ([fd8848d](https://github.com/markuplint/markuplint/commit/fd8848d0bc97270ddba425faf81a110d755bd524))
42
+ - **html-spec:** require as attribute on link[rel=preload] ([3b11c49](https://github.com/markuplint/markuplint/commit/3b11c499c642af51587464fa43c0b162c50bc0ed))
43
+ - **html-spec:** require itemscope/itemtype for itemid and itemtype ([42f8fb9](https://github.com/markuplint/markuplint/commit/42f8fb9a292f491da21df63b852c5e3fd73c5c7e)), closes [#3733](https://github.com/markuplint/markuplint/issues/3733)
44
+ - **html-spec:** split meta[content] by http-equiv value ([e055f32](https://github.com/markuplint/markuplint/commit/e055f32822b86618f658971085c363d79777ce65)), closes [#3598](https://github.com/markuplint/markuplint/issues/3598) [#3734](https://github.com/markuplint/markuplint/issues/3734)
45
+ - **html-spec:** tighten input min/max + progress max value types ([3b0749d](https://github.com/markuplint/markuplint/commit/3b0749d212a651e238ac111f81740d93fe6ee5d4))
46
+ - **html-spec:** type svg:script async/defer attributes as Boolean ([#3961](https://github.com/markuplint/markuplint/issues/3961)) ([65f8a1d](https://github.com/markuplint/markuplint/commit/65f8a1da82e2c2d0ffa4ab742e792fdbfbfc2e90))
47
+ - **html-spec:** wire NonEmptyURL / AbsoluteURLOrEmpty into URL-typed attributes ([8ed5116](https://github.com/markuplint/markuplint/commit/8ed51169c688853d5bba21a0cedd82b35bc5eb96)), closes [#3868](https://github.com/markuplint/markuplint/issues/3868)
48
+ - **types:** enforce element-context autocomplete constraints (select webauthn, input[type=hidden] on/off) ([#3930](https://github.com/markuplint/markuplint/issues/3930)) ([dc51d46](https://github.com/markuplint/markuplint/commit/dc51d460731541c963c9aa8bdf407c20974dced4))
49
+ - **types:** validate CSP3 grammar for meta[content][http-equiv=content-security-policy] ([#3982](https://github.com/markuplint/markuplint/issues/3982)) ([b2d1d84](https://github.com/markuplint/markuplint/commit/b2d1d84ea92c754fe2dbf54950ae8fdb74fe51eb)), closes [#3942](https://github.com/markuplint/markuplint/issues/3942) [#3942](https://github.com/markuplint/markuplint/issues/3942) [#3942](https://github.com/markuplint/markuplint/issues/3942) [#3946](https://github.com/markuplint/markuplint/issues/3946)
50
+
51
+ ### BREAKING CHANGES
52
+
53
+ - **rules:** with no alias coverage.
54
+
55
+ # [5.0.0-rc.4](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.3...v5.0.0-rc.4) (2026-04-19)
56
+
57
+ **Note:** Version bump only for package @markuplint/html-spec
58
+
59
+ # [5.0.0-rc.3](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.2...v5.0.0-rc.3) (2026-04-19)
60
+
61
+ **Note:** Version bump only for package @markuplint/html-spec
62
+
6
63
  # [5.0.0-rc.2](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.1...v5.0.0-rc.2) (2026-04-15)
7
64
 
8
65
  ### Bug Fixes
package/CLAUDE.md ADDED
@@ -0,0 +1,41 @@
1
+ # @markuplint/html-spec
2
+
3
+ Constraints and judgment rules for editing spec data. None of this is derivable from code.
4
+
5
+ ## Mandatory procedure
6
+
7
+ - `index.json` is generated — NEVER edit it directly. Edit `src/*.jsonc`, then run `yarn up:gen` to regenerate. Skipping `up:gen` ships stale data.
8
+ - Idempotency check when modifying `src/spec.*.jsonc`: stage the spec files and `index.json`, run `yarn up:gen` again, and confirm the attributes you changed do NOT reappear in the diff. If they do, the spec file and the generator produce different values — investigate before committing. Then discard the regenerated `index.json` (`git checkout`) and commit the staged version.
9
+ - Run the full `yarn test` suite before committing — spec data changes propagate to `@markuplint/rules` and `@markuplint/ml-spec` tests.
10
+
11
+ ## Editing hazards
12
+
13
+ - `index.json` contains WAI-ARIA 1.1 / 1.2 / 1.3 role definitions, so many strings appear three times. NEVER use `replace_all` on it — always target the specific version block.
14
+
15
+ ## Data precedence (manual spec vs MDN)
16
+
17
+ - Manual `src/spec.*.jsonc` data overrides same-named MDN-scraped data. Use this to correct inaccurate MDN data.
18
+ - MDN-only attributes (no manual entry) can only be overridden or suppressed by ADDING a manual entry — merely deleting nothing has no effect.
19
+ - In a regenerated diff: minor MDN description rewording and new MDN-sourced attributes → commit as-is. Substantive changes (ARIA mappings, content models) → require manual spec edits verified against HTML Living Standard / WAI-ARIA / HTML-ARIA (fetch the live spec; MDN is not the authority).
20
+ - **Flag transitions (`deprecated` / `nonStandard` / `experimental` / `obsolete` appearing or disappearing) are data updates only when they're isolated — a handful of attributes on a page that genuinely changed status.** If a regeneration flips dozens of flags at once across unrelated elements, that is a scraper regression, not an MDN update: MDN's page markup (badge class names, section structure) changes far more often than the underlying status does. Before committing a mass flag change, check in this order:
21
+ 1. Does [BCD](https://github.com/mdn/browser-compat-data) still mark the feature with the flag in question for the affected items? (`api.status` in the relevant `browser-compat-data/*.json`, or `npx bcd-utils` if available)
22
+ 2. Does the MDN page's source markdown ([mdn/content](https://github.com/mdn/content)) still carry the corresponding macro (e.g. `{{deprecated_inline}}`, `{{non-standard_inline}}`) for those items?
23
+ 3. If both still say yes, fetch the live rendered page and compare its actual badge markup (class names, `title` text) against what `generator/scraping.ts` selects for. A renamed or restructured badge — not a real status change — is the usual cause. Confirm by checking whether _other_ flags scraped from the same `<dt>` (e.g. `nonStandard`, `experimental`) also went missing; if only one flag type vanished across many elements while sibling flags on the same nodes stayed intact, the selector for that one flag is stale.
24
+
25
+ ## ARIA version placement
26
+
27
+ - Top-level `aria` = default/latest; mutable — keep it matching the current W3C Recommendation ("ARIA in HTML", ARIA 1.2 based).
28
+ - `"1.1"` key = frozen snapshot — NEVER add new roles to it.
29
+ - ARIA 1.3 draft-only role (not in the W3C Rec) → add to top-level AND create a `"1.2"` key freezing the current 1.2 list. Role already in the W3C Rec → top-level only.
30
+ - Keep `permittedRoles` arrays in alphabetical order.
31
+
32
+ ## Cross-package coupling
33
+
34
+ - An element missing from its content categories in `src/spec-common.contents.jsonc` causes `permitted-contents` false positives downstream. Adding an element REQUIRES adding it to its categories there. Category names must match the `Category` enum in `ml-spec/schemas/content-models.schema.json`.
35
+ - `ml-spec/src/algorithm/aria/get-permitted-roles-spec.spec.ts` hardcodes version-specific `permittedRoles` expectations (img, button, input, form, …). When changing `permittedRoles`, update those arrays — only the matching version's expectations (e.g., `'1.2'` tests, not `'1.1'`, for newly added roles).
36
+ - Adding a value to an attribute enum changes error-message strings asserted in `rules/src/no-invalid-attr-value/index.spec.ts`.
37
+
38
+ ## Workflow
39
+
40
+ - One spec change (new attribute, ARIA mapping fix, …) per branch/PR; description-only updates may be batched into one PR.
41
+ - Commit prefixes: description-only updates → `chore`, attribute/spec additions → `feat`, spec data corrections → `fix`.
package/README.md CHANGED
@@ -75,13 +75,6 @@ $ yarn add @markuplint/html-spec
75
75
 
76
76
  ## Contributing
77
77
 
78
- For detailed documentation, see:
79
-
80
- - [Architecture](ARCHITECTURE.md) -- Package structure, data flow, and integration points
81
- - [Element Specification Format](docs/element-spec-format.md) -- JSON spec file reference, content models, ARIA integration
82
- - [Build Pipeline](docs/build-pipeline.md) -- Build process, external data sources, generator modules
83
- - [Maintenance Guide](docs/maintenance.md) -- Common recipes, testing, troubleshooting
84
-
85
78
  ## License
86
79
 
87
80
  MIT