@markuplint/html-spec 5.0.0-alpha.3 → 5.0.0-rc.0

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,12 @@
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.0](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.3...v5.0.0-rc.0) (2026-03-12)
7
+
8
+ ### Features
9
+
10
+ - **html-spec:** add experimental focusgroup and focusgroupstart global attributes ([ff406f1](https://github.com/markuplint/markuplint/commit/ff406f1be43c9669e57ea0f05de161b797fc5ecc)), closes [#3384](https://github.com/markuplint/markuplint/issues/3384)
11
+
6
12
  # [5.0.0-alpha.3](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.2...v5.0.0-alpha.3) (2026-02-26)
7
13
 
8
14
  **Note:** Version bump only for package @markuplint/html-spec
@@ -362,16 +362,20 @@ spec.mml_mn.jsonc # <mml:mn> 要素
362
362
 
363
363
  スペースまたはカンマ区切りのトークンリストを定義します。
364
364
 
365
- | フィールド | 型 | 説明 |
366
- | ----------------- | -------------------- | ----------------------------- |
367
- | `token` | `string` | トークンの型名 |
368
- | `separator` | `"space" \| "comma"` | 区切り文字 |
369
- | `unique` | `boolean` | 重複を許可しない |
370
- | `caseInsensitive` | `boolean` | 大文字小文字を区別しない |
371
- | `ordered` | `boolean` | 順序が重要 |
372
- | `number` | `string` | 個数制約(`"zeroOrMore"` 等) |
365
+ | フィールド | 型 | 説明 |
366
+ | ----------------- | ------------------------ | ------------------------------------------------------------------------- |
367
+ | `token` | `string \| { enum: [] }` | トークンの型名(文字列)、またはインライン列挙定義(`enum` オブジェクト) |
368
+ | `separator` | `"space" \| "comma"` | 区切り文字 |
369
+ | `unique` | `boolean` | 重複を許可しない |
370
+ | `caseInsensitive` | `boolean` | 大文字小文字を区別しない |
371
+ | `ordered` | `boolean` | 順序が重要 |
372
+ | `number` | `string` | 個数制約(`"zeroOrMore"` 等) |
373
+
374
+ `token` が文字列の場合、名前付き型(例: `"Accept"`, `"DOMID"`)を参照します。
375
+ `token` が `enum` を含むオブジェクトの場合、許可されるキーワードのセットをインラインで定義します:
373
376
 
374
377
  ```jsonc
378
+ // 文字列型名を参照する例
375
379
  "accept": {
376
380
  "type": {
377
381
  "token": "Accept",
@@ -381,6 +385,20 @@ spec.mml_mn.jsonc # <mml:mn> 要素
381
385
  },
382
386
  "condition": "[type='file' i]"
383
387
  }
388
+
389
+ // インライン列挙定義の例
390
+ "focusgroup": {
391
+ "type": {
392
+ "token": {
393
+ "enum": ["toolbar", "tablist", "radiogroup", "listbox", "menu", "menubar", "none",
394
+ "inline", "block", "wrap", "nowrap", "nomemory"]
395
+ },
396
+ "separator": "space",
397
+ "unique": true,
398
+ "caseInsensitive": true
399
+ },
400
+ "experimental": true
401
+ }
384
402
  ```
385
403
 
386
404
  #### 数値制約型
@@ -263,14 +263,25 @@ set that particular flag.
263
263
  { "token": "Accept", "separator": "comma", "unique": true, "caseInsensitive": true }
264
264
  ```
265
265
 
266
- | Field | Description |
267
- | ----------------- | ------------------------------------------------ |
268
- | `token` | Token type name |
269
- | `separator` | `"space"` or `"comma"` |
270
- | `unique` | Whether tokens must be unique |
271
- | `caseInsensitive` | Whether matching is case-insensitive |
272
- | `ordered` | Whether order matters |
273
- | `number` | Cardinality: `"zeroOrMore"`, `"oneOrMore"`, etc. |
266
+ | Field | Description |
267
+ | ----------------- | ----------------------------------------------------------------------- |
268
+ | `token` | Token type: a string (type name) or an object with `enum` (inline enum) |
269
+ | `separator` | `"space"` or `"comma"` |
270
+ | `unique` | Whether tokens must be unique |
271
+ | `caseInsensitive` | Whether matching is case-insensitive |
272
+ | `ordered` | Whether order matters |
273
+ | `number` | Cardinality: `"zeroOrMore"`, `"oneOrMore"`, etc. |
274
+
275
+ When `token` is a string, it references a named type (e.g., `"Accept"`, `"DOMID"`).
276
+ When `token` is an object with `enum`, it defines an inline set of allowed keywords:
277
+
278
+ ```json
279
+ {
280
+ "token": { "enum": ["allow-forms", "allow-scripts", "allow-popups"] },
281
+ "separator": "space",
282
+ "unique": true
283
+ }
284
+ ```
274
285
 
275
286
  **Number constraint type:**
276
287
 
package/index.json CHANGED
@@ -308,6 +308,34 @@
308
308
  "enum": ["enter", "done", "go", "next", "previous", "search", "send"]
309
309
  }
310
310
  },
311
+ "focusgroup": {
312
+ "type": {
313
+ "token": {
314
+ "enum": [
315
+ "toolbar",
316
+ "tablist",
317
+ "radiogroup",
318
+ "listbox",
319
+ "menu",
320
+ "menubar",
321
+ "none",
322
+ "inline",
323
+ "block",
324
+ "wrap",
325
+ "nowrap",
326
+ "nomemory"
327
+ ]
328
+ },
329
+ "separator": "space",
330
+ "unique": true,
331
+ "caseInsensitive": true
332
+ },
333
+ "experimental": true
334
+ },
335
+ "focusgroupstart": {
336
+ "type": "Boolean",
337
+ "experimental": true
338
+ },
311
339
  "headingoffset": {
312
340
  "type": {
313
341
  "type": "integer",
@@ -5202,7 +5230,7 @@
5202
5230
  },
5203
5231
  {
5204
5232
  "name": "group",
5205
- "description": "A set of user interface objects that is not intended to be included in a page summary or table of contents by assistive technologies.\n\nContrast with region, which is a grouping of user interface objects that will be included in a page summary or table of contents.\n\nAuthors SHOULD use a group to form a logical collection of items in a widget, such as children in a tree widget forming a collection of siblings in a hierarchy. However, when a group is used in the context of a listbox, for example, authors MUST limit its children to option elements. Therefore, proper handling of group by authors and assistive technologies is determined by the context in which it is provided.\n\nAuthors MAY nest group elements. If a section is significant enough to warrant inclusion in the web page's table of contents, the author SHOULD assign it a role of region or a standard landmark role.",
5233
+ "description": "A set of user interface objects and information that is not intended to be included in a page summary or table of contents by assistive technologies.\n\nContrast with region, which is a grouping of user interface objects and information that will be included in a page summary or table of contents.\n\nAuthors SHOULD use a group to form a logical collection of items in a widget, such as children in a tree widget forming a collection of siblings in a hierarchy. However, when a group is used in the context of a listbox, for example, authors MUST limit its children to option elements. Therefore, proper handling of group by authors and assistive technologies is determined by the context in which it is provided.\n\nAuthors MAY nest group elements. If a section is significant enough to warrant inclusion in the web page's table of contents, the author SHOULD assign it a role of region or a standard landmark role.",
5206
5234
  "generalization": ["section"],
5207
5235
  "requiredContextRole": [],
5208
5236
  "requiredOwnedElements": [],
@@ -8707,7 +8735,7 @@
8707
8735
  },
8708
8736
  {
8709
8737
  "name": "radiogroup",
8710
- "description": "A group of radio buttons.\n\nA radiogroup is a type of select list that can only have a single entry checked at any one time. Authors SHOULD enforce that only one radio button in a group can be checked at the same time. When one item in the group is checked, the previously checked item becomes unchecked (its aria-checked attribute becomes false).\n\nAuthors SHOULD provide an accessible name for a radiogroup, which can be done with the aria-label or aria-labelledby attribute. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present for the radiogroup.",
8738
+ "description": "A group of radio buttons.\n\nA radiogroup is a type of select list that can only have a single entry checked at any one time. Authors SHOULD enforce that only one radio button in a group can be checked at the same time. When one item in the group is checked, the previously checked item becomes unchecked (its aria-checked attribute becomes false).\n\nAuthors SHOULD provide an accessible name for a radiogroup, which can be done with the aria-label or aria-labelledby attribute. Authors SHOULD reference a visible label with aria-labelledby if a visible label is present for the radiogroup.\n\nWhile a radiogroup is primarily meant to group and thus associate related radio buttons, a radiogroup can contain other non-radio button elements. For instance, descriptive text beyond what serves as the radio button's label, or even in some cases, form controls or other information that are enabled, revealed or both when a specific radio button has been chosen (checked).\n\nHowever, including non-radio button content into a radiogroup is not without its potential UX drawbacks. As it is generally expected to use arrow keys to navigate between radio buttons, any non-radio button content could go unnoticed by some users, as arrowing through the radio buttons would mean that any other tabbable elements (e.g., hyperlinks or other form fields) would be skipped. When creating a radiogroup with other arbitrary content, consider if the non-radio content could be just as impactful if it was presented as an immediate sibling after the radiogroup.",
8711
8739
  "generalization": ["select"],
8712
8740
  "requiredContextRole": [],
8713
8741
  "requiredOwnedElements": [],
@@ -52706,7 +52734,7 @@
52706
52734
  },
52707
52735
  "attributes": {
52708
52736
  "as": {
52709
- "description": "This attribute is required when rel=\"preload\" has been set on the <link> element, optional when rel=\"modulepreload\" has been set, and otherwise should not be used. It specifies the type of content being loaded by the <link>, which is necessary for request matching, application of correct content security policy, and setting of correct Accept request header. Furthermore, rel=\"preload\" uses this as a signal for request prioritization. The table below lists the valid values for this attribute and the elements or resources they apply to. Value Applies To audio <audio> elements document <iframe> and <frame> elements embed <embed> elements fetch fetch, XHR Note: This value also requires <link> to contain the crossorigin attribute, see CORS-enabled fetches. font CSS @font-face Note: This value also requires <link> to contain the crossorigin attribute, see CORS-enabled fetches. image <img> and <picture> elements with srcset or imageset attributes, SVG <image> elements, CSS *-image rules object <object> elements script <script> elements, Worker importScripts style <link rel=stylesheet> elements, CSS @import track <track> elements video <video> elements worker Worker, SharedWorker",
52737
+ "description": "This attribute is required when rel=\"preload\" has been set on the <link> element, optional when rel=\"modulepreload\" has been set, and otherwise should not be used. It specifies the type of content being loaded by the <link>, which is necessary for request matching, application of correct content security policy, and setting of correct Accept request header. Furthermore, rel=\"preload\" uses this as a signal for request prioritization. The table below lists the valid values for this attribute and the elements or resources they apply to. Value Applies To audio <audio> elements document <iframe> and <frame> elements embed <embed> elements fetch fetch, XHR Note: This value also requires <link> to contain the crossorigin attribute, see CORS-enabled fetches. font CSS @font-face Note: This value also requires <link> to contain the crossorigin attribute, see CORS-enabled fetches. image <img> and <picture> elements with srcset or imageset attributes, SVG <image> elements, CSS *-image rules json modulepreload destinations. object <object> elements script <script> elements, Worker importScripts, and modulepreload destinations. style <link rel=stylesheet> elements, CSS @import and modulepreload destinations. track <track> elements video <video> elements worker Worker, SharedWorker",
52710
52738
  "type": {
52711
52739
  "enum": [
52712
52740
  "audioworklet",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/html-spec",
3
- "version": "5.0.0-alpha.3",
3
+ "version": "5.0.0-rc.0",
4
4
  "description": "A specification of HTML Living Standard for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -29,12 +29,12 @@
29
29
  "gen:prettier": "npx prettier --write index.json"
30
30
  },
31
31
  "devDependencies": {
32
- "@markuplint/spec-generator": "5.0.0-alpha.3",
33
- "@markuplint/test-tools": "5.0.0-alpha.3",
32
+ "@markuplint/spec-generator": "5.0.0-rc.0",
33
+ "@markuplint/test-tools": "5.0.0-rc.0",
34
34
  "jsonc-parser": "3.3.1"
35
35
  },
36
36
  "dependencies": {
37
- "@markuplint/ml-spec": "5.0.0-alpha.3"
37
+ "@markuplint/ml-spec": "5.0.0-rc.0"
38
38
  },
39
- "gitHead": "2fbdf26daa3d021ac628ccc2f59f0eeae6ddd53d"
39
+ "gitHead": "ebf4d7cfca0c259aead3b292c6b8a202db4cd802"
40
40
  }