@markuplint/html-spec 4.7.2 → 4.8.1-alpha.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 +15 -0
- package/index.js +1 -1
- package/index.json +9 -6
- package/package.json +15 -5
- package/test/structure.spec.mjs +0 -98
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,21 @@
|
|
|
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
|
+
## [4.8.1-alpha.0](https://github.com/markuplint/markuplint/compare/@markuplint/html-spec@4.8.0...@markuplint/html-spec@4.8.1-alpha.0) (2024-06-02)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @markuplint/html-spec
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [4.8.0](https://github.com/markuplint/markuplint/compare/@markuplint/html-spec@4.7.2...@markuplint/html-spec@4.8.0) (2024-05-28)
|
|
15
|
+
|
|
16
|
+
### Features
|
|
17
|
+
|
|
18
|
+
- **html-spec:** add the new `shadowrootserializable` attribute to the `template` element ([0ffbace](https://github.com/markuplint/markuplint/commit/0ffbace70332dfc7394bdb79c58abf1695c7fe5b))
|
|
19
|
+
- **html-spec:** exports JSON directly ([38489bb](https://github.com/markuplint/markuplint/commit/38489bbac006ecdfd5af6a4a55db5fb46c281202))
|
|
20
|
+
|
|
6
21
|
## [4.7.2](https://github.com/markuplint/markuplint/compare/@markuplint/html-spec@4.7.1...@markuplint/html-spec@4.7.2) (2024-05-12)
|
|
7
22
|
|
|
8
23
|
**Note:** Version bump only for package @markuplint/html-spec
|
package/index.js
CHANGED
package/index.json
CHANGED
|
@@ -1754,7 +1754,7 @@
|
|
|
1754
1754
|
},
|
|
1755
1755
|
{
|
|
1756
1756
|
"name": "alertdialog",
|
|
1757
|
-
"description": "A type of dialog that contains an alert message, where initial focus goes to an element within the dialog. See related alert and dialog.\n\nAlert dialogs are used to convey messages to alert the user. The alertdialog role goes on the node containing both the alert message and the rest of the dialog.
|
|
1757
|
+
"description": "A type of dialog that contains an alert message, where initial focus goes to an element within the dialog. See related alert and dialog.\n\nAlert dialogs are used to convey messages to alert the user. The alertdialog role goes on the node containing both the alert message and the rest of the dialog. Authors SHOULD make alert dialogs modal by ensuring that, while the alertdialog is shown, keyboard and mouse interactions only operate within the dialog. See aria-modal.\n\nUnlike alert, alertdialog can receive a response from the user. For example, to confirm that the user understands the alert being generated. When the alert dialog is displayed, authors SHOULD set focus to an active element within the alert dialog, such as a form control or confirmation button. The user agent SHOULD fire a system alert event through the accessibility API when the alert is created, provided one is specified by the intended accessibility API.\n\nAuthors SHOULD use aria-describedby on an alertdialog to reference the alert message element in the dialog. If they do not, an assistive technology can resort to its internal recovery mechanism to determine the contents of the alert message.",
|
|
1758
1758
|
"generalization": ["alert", "dialog"],
|
|
1759
1759
|
"requiredContextRole": [],
|
|
1760
1760
|
"requiredOwnedElements": [],
|
|
@@ -5926,7 +5926,7 @@
|
|
|
5926
5926
|
},
|
|
5927
5927
|
{
|
|
5928
5928
|
"name": "link",
|
|
5929
|
-
"description": "An interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button.\n\nIf this is a native link in the host language (such as an HTML anchor with an href value), activating the link causes the user agent to navigate to that resource. If this is a simulated link, the
|
|
5929
|
+
"description": "An interactive reference to an internal or external resource that, when activated, causes the user agent to navigate to that resource. See related button.\n\nIf this is a native link in the host language (such as an HTML anchor with an href value), activating the link causes the user agent to navigate to that resource. If this is a simulated link, the author is responsible for managing navigation.\n\nIf pressing the link triggers an action but does not change browser focus or page location, authors are advised to consider using the button role instead of the link role.",
|
|
5930
5930
|
"generalization": ["command"],
|
|
5931
5931
|
"requiredContextRole": [],
|
|
5932
5932
|
"requiredOwnedElements": [],
|
|
@@ -7218,7 +7218,7 @@
|
|
|
7218
7218
|
},
|
|
7219
7219
|
{
|
|
7220
7220
|
"name": "menuitem",
|
|
7221
|
-
"description": "An option in a set of choices contained by a menu or menubar.\n\nAuthors MUST ensure elements with role menuitem are accessibility children of an element with role menu or an element with role group that is an accessibility child of an element with role menu.\n\nAuthors MAY disable a menu item with the aria-disabled attribute. If the menu item has its aria-haspopup attribute set to true, it indicates that the menu item can be used to launch a sub-level menu, and authors SHOULD display a new sub-level menu when the menu item is activated.\n\nIn order to identify that they are related widgets, authors MUST ensure that menu items are accessibility descendants of an element with role menu or menubar. Authors MAY separate menu items into sets by use of a separator or an element with an equivalent role from the native markup language.",
|
|
7221
|
+
"description": "An option in a set of choices contained by a menu or menubar.\n\nAuthors MUST ensure elements with role menuitem are accessibility children of an element with role menu, menubar, or an element with role group that is an accessibility child of an element with role menu or menubar.\n\nAuthors MAY disable a menu item with the aria-disabled attribute. If the menu item has its aria-haspopup attribute set to true, it indicates that the menu item can be used to launch a sub-level menu, and authors SHOULD display a new sub-level menu when the menu item is activated.\n\nIn order to identify that they are related widgets, authors MUST ensure that menu items are accessibility descendants of an element with role menu or menubar. Authors MAY separate menu items into sets by use of a separator or an element with an equivalent role from the native markup language.",
|
|
7222
7222
|
"generalization": ["command"],
|
|
7223
7223
|
"requiredContextRole": ["menu", "menubar", "menu > group", "menubar > group"],
|
|
7224
7224
|
"requiredOwnedElements": [],
|
|
@@ -7337,7 +7337,7 @@
|
|
|
7337
7337
|
},
|
|
7338
7338
|
{
|
|
7339
7339
|
"name": "menuitemcheckbox",
|
|
7340
|
-
"description": "A menuitem with a checkable state whose possible values are true, false, or mixed.\n\nAuthors MUST ensure elements with role menuitemcheckbox are accessibility children of an element with role menu or an element with role group that is
|
|
7340
|
+
"description": "A menuitem with a checkable state whose possible values are true, false, or mixed.\n\nAuthors MUST ensure elements with role menuitemcheckbox are accessibility children of an element with role menu, menubar, or an element with role group that is an accessibility child of an element with role menu or menubar.\n\nThe aria-checked attribute of a menuitemcheckbox indicates whether the menu item is checked (true), unchecked (false), or represents a sub-level menu of other menu items that have a mixture of checked and unchecked values (mixed).\n\nIn order to identify that they are related widgets, authors MUST ensure that menu item checkboxes are the accessibility descendants of an element with role menu or menubar. Authors MAY separate menu items into sets by use of a separator or an element with an equivalent role from the native markup language.",
|
|
7341
7341
|
"generalization": ["menuitem"],
|
|
7342
7342
|
"requiredContextRole": ["menu", "menubar", "menu > group", "menubar > group"],
|
|
7343
7343
|
"requiredOwnedElements": [],
|
|
@@ -7466,7 +7466,7 @@
|
|
|
7466
7466
|
},
|
|
7467
7467
|
{
|
|
7468
7468
|
"name": "menuitemradio",
|
|
7469
|
-
"description": "A checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.\n\nAuthors MUST ensure elements with role menuitemradio are accessibility children of an element with role menu or
|
|
7469
|
+
"description": "A checkable menuitem in a set of elements with the same role, only one of which can be checked at a time.\n\nAuthors MUST ensure elements with role menuitemradio are accessibility children of an element with role menu, menubar, or an element with role group that is an accessibility child of an element with role menu or menubar.\n\nAuthors SHOULD enforce that only one menuitemradio 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\nIn order to identify that they are related widgets, authors MUST ensure that menu item radios are accessibility descendants of an element with role menu or menubar.\n\nIf a menu or menubar contains more than one group of menuitemradio elements, or if the menu contains one group and other, unrelated menu items, authors SHOULD contain each set of related menuitemradio elements in an element using the group role. Authors MAY also delimit the group from other menu items with an element using the separator role, or an element with an equivalent role from the native markup language.",
|
|
7470
7470
|
"generalization": ["menuitem"],
|
|
7471
7471
|
"requiredContextRole": ["menu", "menubar", "menu > group", "menubar > group"],
|
|
7472
7472
|
"requiredOwnedElements": [],
|
|
@@ -41083,6 +41083,9 @@
|
|
|
41083
41083
|
"missingValueDefault": "none",
|
|
41084
41084
|
"invalidValueDefault": "none"
|
|
41085
41085
|
}
|
|
41086
|
+
},
|
|
41087
|
+
"shadowrootserializable": {
|
|
41088
|
+
"type": "Boolean"
|
|
41086
41089
|
}
|
|
41087
41090
|
}
|
|
41088
41091
|
},
|
|
@@ -48386,7 +48389,7 @@
|
|
|
48386
48389
|
"name": "svg:view",
|
|
48387
48390
|
"namespace": "http://www.w3.org/2000/svg",
|
|
48388
48391
|
"cite": "https://developer.mozilla.org/en-US/docs/Web/SVG/Element/view",
|
|
48389
|
-
"description": "
|
|
48392
|
+
"description": "The <view> SVG element defines a particular view of an SVG document. A specific view can be displayed by referencing the <view> element's id as the target fragment of a URL.",
|
|
48390
48393
|
"categories": [],
|
|
48391
48394
|
"contentModel": {
|
|
48392
48395
|
"contents": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/html-spec",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.1-alpha.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>",
|
|
@@ -8,6 +8,16 @@
|
|
|
8
8
|
"private": false,
|
|
9
9
|
"main": "index.js",
|
|
10
10
|
"types": "index.d.ts",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"import": {
|
|
14
|
+
"default": "./index.js",
|
|
15
|
+
"types": "./index.d.ts"
|
|
16
|
+
},
|
|
17
|
+
"require": "./index.js"
|
|
18
|
+
},
|
|
19
|
+
"./json": "./index.json"
|
|
20
|
+
},
|
|
11
21
|
"publishConfig": {
|
|
12
22
|
"access": "public"
|
|
13
23
|
},
|
|
@@ -17,11 +27,11 @@
|
|
|
17
27
|
"gen:prettier": "prettier --write index.json"
|
|
18
28
|
},
|
|
19
29
|
"devDependencies": {
|
|
20
|
-
"@markuplint/spec-generator": "4.6.
|
|
21
|
-
"@markuplint/test-tools": "4.5.
|
|
30
|
+
"@markuplint/spec-generator": "4.6.4-alpha.0",
|
|
31
|
+
"@markuplint/test-tools": "4.5.4-alpha.0"
|
|
22
32
|
},
|
|
23
33
|
"dependencies": {
|
|
24
|
-
"@markuplint/ml-spec": "4.6.0"
|
|
34
|
+
"@markuplint/ml-spec": "4.6.2-alpha.0"
|
|
25
35
|
},
|
|
26
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "b1cabc178e3553fd66c7ed4357b4124eb2585327"
|
|
27
37
|
}
|
package/test/structure.spec.mjs
DELETED
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { readFile } from 'node:fs/promises';
|
|
2
|
-
import { createRequire } from 'node:module';
|
|
3
|
-
import path from 'node:path';
|
|
4
|
-
import { fileURLToPath } from 'node:url';
|
|
5
|
-
|
|
6
|
-
import { resolveNamespace, getAttrSpecsByNames } from '@markuplint/ml-spec';
|
|
7
|
-
import { glob } from '@markuplint/test-tools';
|
|
8
|
-
import Ajv from 'ajv';
|
|
9
|
-
import strip from 'strip-json-comments';
|
|
10
|
-
import { describe, test, expect } from 'vitest';
|
|
11
|
-
|
|
12
|
-
import htmlSpec from '../index.js';
|
|
13
|
-
|
|
14
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
15
|
-
const __dirname = path.dirname(__filename);
|
|
16
|
-
|
|
17
|
-
const require = createRequire(import.meta.url);
|
|
18
|
-
|
|
19
|
-
const schemas = {
|
|
20
|
-
element: {
|
|
21
|
-
$id: '@markuplint/ml-spec/schemas/element.schema.json',
|
|
22
|
-
...require('../../ml-spec/schemas/element.schema.json'),
|
|
23
|
-
},
|
|
24
|
-
aria: {
|
|
25
|
-
$id: '@markuplint/ml-spec/schemas/aria.schema.json',
|
|
26
|
-
...require('../../ml-spec/schemas/aria.schema.json'),
|
|
27
|
-
},
|
|
28
|
-
contentModels: {
|
|
29
|
-
$id: '@markuplint/ml-spec/schemas/content-models.schema.json',
|
|
30
|
-
...require('../../ml-spec/schemas/content-models.schema.json'),
|
|
31
|
-
},
|
|
32
|
-
globalAttributes: {
|
|
33
|
-
$id: '@markuplint/ml-spec/schemas/global-attributes.schema.json',
|
|
34
|
-
...require('../../ml-spec/schemas/global-attributes.schema.json'),
|
|
35
|
-
},
|
|
36
|
-
attributes: {
|
|
37
|
-
$id: '@markuplint/ml-spec/schemas/attributes.schema.json',
|
|
38
|
-
...require('../../ml-spec/schemas/attributes.schema.json'),
|
|
39
|
-
},
|
|
40
|
-
types: {
|
|
41
|
-
$id: '@markuplint/types/types.schema.json',
|
|
42
|
-
...require('../../types/types.schema.json'),
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
test('structure', () => {
|
|
47
|
-
// eslint-disable-next-line import/no-named-as-default-member
|
|
48
|
-
for (const el of htmlSpec.specs) {
|
|
49
|
-
const { localName, namespaceURI } = resolveNamespace(el.name);
|
|
50
|
-
try {
|
|
51
|
-
getAttrSpecsByNames(localName, namespaceURI, htmlSpec);
|
|
52
|
-
} catch {
|
|
53
|
-
throw el;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
|
|
58
|
-
describe('schema', () => {
|
|
59
|
-
const map = [
|
|
60
|
-
[
|
|
61
|
-
'spec.*.json',
|
|
62
|
-
new Ajv({
|
|
63
|
-
schemas: [
|
|
64
|
-
schemas.element,
|
|
65
|
-
schemas.aria,
|
|
66
|
-
schemas.contentModels,
|
|
67
|
-
schemas.globalAttributes,
|
|
68
|
-
schemas.attributes,
|
|
69
|
-
schemas.types,
|
|
70
|
-
],
|
|
71
|
-
}).getSchema(schemas.element.$id),
|
|
72
|
-
|
|
73
|
-
path.resolve(__dirname, 'spec.*.json'),
|
|
74
|
-
],
|
|
75
|
-
[
|
|
76
|
-
'spec-common.attributes.json',
|
|
77
|
-
new Ajv({
|
|
78
|
-
schemas: [schemas.globalAttributes, schemas.attributes, schemas.types],
|
|
79
|
-
}).getSchema(schemas.globalAttributes.$id),
|
|
80
|
-
|
|
81
|
-
path.resolve(__dirname, 'spec-common.attributes.json'),
|
|
82
|
-
],
|
|
83
|
-
];
|
|
84
|
-
|
|
85
|
-
for (const [testName, validator, targetFiles] of map) {
|
|
86
|
-
test(testName, async () => {
|
|
87
|
-
const files = await glob(targetFiles);
|
|
88
|
-
for (const jsonPath of files) {
|
|
89
|
-
const json = JSON.parse(strip(await readFile(jsonPath, { encoding: 'utf-8' })));
|
|
90
|
-
const isValid = validator(json);
|
|
91
|
-
if (!isValid) {
|
|
92
|
-
throw new Error(`${path.basename(jsonPath)} is invalid (${validator.schemaEnv.baseId})`);
|
|
93
|
-
}
|
|
94
|
-
}
|
|
95
|
-
expect(testName).toBe(testName);
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
});
|