@markuplint/rules 4.11.2 → 5.0.0-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 +63 -2
- package/SKILL.md +76 -0
- package/lib/attr-check.d.ts +46 -7
- package/lib/attr-check.js +42 -8
- package/lib/attr-duplication/index.d.ts +7 -0
- package/lib/attr-duplication/index.js +7 -0
- package/lib/attr-duplication/meta.d.ts +1 -0
- package/lib/attr-duplication/meta.js +1 -0
- package/lib/attr-value-quotes/index.d.ts +10 -0
- package/lib/attr-value-quotes/index.js +10 -0
- package/lib/attr-value-quotes/meta.d.ts +1 -0
- package/lib/attr-value-quotes/meta.js +1 -0
- package/lib/case-sensitive-attr-name/index.d.ts +9 -0
- package/lib/case-sensitive-attr-name/index.js +8 -0
- package/lib/case-sensitive-attr-name/meta.d.ts +1 -0
- package/lib/case-sensitive-attr-name/meta.js +1 -0
- package/lib/case-sensitive-tag-name/index.d.ts +9 -0
- package/lib/case-sensitive-tag-name/index.js +8 -0
- package/lib/case-sensitive-tag-name/meta.d.ts +1 -0
- package/lib/case-sensitive-tag-name/meta.js +1 -0
- package/lib/character-reference/index.d.ts +9 -0
- package/lib/character-reference/index.js +20 -0
- package/lib/character-reference/meta.d.ts +1 -0
- package/lib/character-reference/meta.js +1 -0
- package/lib/class-naming/index.d.ts +9 -0
- package/lib/class-naming/index.js +8 -0
- package/lib/class-naming/meta.d.ts +1 -0
- package/lib/class-naming/meta.js +1 -0
- package/lib/correct-aspect-ratio/index.d.ts +5 -0
- package/lib/correct-aspect-ratio/index.js +80 -0
- package/lib/correct-aspect-ratio/meta.d.ts +4 -0
- package/lib/correct-aspect-ratio/meta.js +3 -0
- package/lib/correct-aspect-ratio/resolve-image-size.d.ts +24 -0
- package/lib/correct-aspect-ratio/resolve-image-size.js +165 -0
- package/lib/create-message.d.ts +29 -2
- package/lib/create-message.js +60 -2
- package/lib/debug.d.ts +9 -0
- package/lib/debug.js +5 -0
- package/lib/deprecated-attr/index.d.ts +6 -0
- package/lib/deprecated-attr/index.js +6 -0
- package/lib/deprecated-attr/meta.d.ts +1 -0
- package/lib/deprecated-attr/meta.js +1 -0
- package/lib/deprecated-element/index.d.ts +6 -0
- package/lib/deprecated-element/index.js +8 -2
- package/lib/deprecated-element/meta.d.ts +1 -0
- package/lib/deprecated-element/meta.js +1 -0
- package/lib/disallowed-element/index.d.ts +7 -0
- package/lib/disallowed-element/index.js +7 -0
- package/lib/disallowed-element/meta.d.ts +1 -0
- package/lib/disallowed-element/meta.js +1 -0
- package/lib/doctype/index.d.ts +10 -0
- package/lib/doctype/index.js +8 -0
- package/lib/doctype/meta.d.ts +1 -0
- package/lib/doctype/meta.js +1 -0
- package/lib/end-tag/index.d.ts +7 -0
- package/lib/end-tag/index.js +8 -1
- package/lib/end-tag/meta.d.ts +1 -0
- package/lib/end-tag/meta.js +1 -0
- package/lib/heading-levels/index.d.ts +6 -0
- package/lib/heading-levels/index.js +6 -1
- package/lib/heading-levels/meta.d.ts +1 -0
- package/lib/heading-levels/meta.js +1 -0
- package/lib/helpers.d.ts +105 -0
- package/lib/helpers.js +112 -16
- package/lib/id-duplication/index.d.ts +7 -0
- package/lib/id-duplication/index.js +7 -0
- package/lib/id-duplication/meta.d.ts +1 -0
- package/lib/id-duplication/meta.js +1 -0
- package/lib/index.d.ts +43 -41
- package/lib/index.js +24 -0
- package/lib/ineffective-attr/index.d.ts +7 -0
- package/lib/ineffective-attr/index.js +7 -0
- package/lib/ineffective-attr/meta.d.ts +1 -0
- package/lib/ineffective-attr/meta.js +1 -0
- package/lib/invalid-attr/index.d.ts +29 -21
- package/lib/invalid-attr/index.js +60 -109
- package/lib/invalid-attr/meta.d.ts +1 -0
- package/lib/invalid-attr/meta.js +1 -0
- package/lib/label-has-control/index.d.ts +7 -0
- package/lib/label-has-control/index.js +11 -0
- package/lib/label-has-control/meta.d.ts +1 -0
- package/lib/label-has-control/meta.js +1 -0
- package/lib/landmark-roles/index.d.ts +14 -0
- package/lib/landmark-roles/index.js +21 -0
- package/lib/landmark-roles/meta.d.ts +1 -0
- package/lib/landmark-roles/meta.js +1 -0
- package/lib/link-types/index.d.ts +10 -0
- package/lib/link-types/index.js +180 -0
- package/lib/link-types/meta.d.ts +5 -0
- package/lib/link-types/meta.js +4 -0
- package/lib/neighbor-popovers/index.d.ts +8 -0
- package/lib/neighbor-popovers/index.js +28 -6
- package/lib/neighbor-popovers/meta.d.ts +1 -0
- package/lib/neighbor-popovers/meta.js +1 -0
- package/lib/no-ambiguous-navigable-target-names/index.d.ts +8 -0
- package/lib/no-ambiguous-navigable-target-names/index.js +8 -0
- package/lib/no-ambiguous-navigable-target-names/meta.d.ts +1 -0
- package/lib/no-ambiguous-navigable-target-names/meta.js +1 -0
- package/lib/no-boolean-attr-value/index.d.ts +7 -0
- package/lib/no-boolean-attr-value/index.js +7 -0
- package/lib/no-boolean-attr-value/meta.d.ts +1 -0
- package/lib/no-boolean-attr-value/meta.js +1 -0
- package/lib/no-consecutive-br/index.d.ts +8 -0
- package/lib/no-consecutive-br/index.js +8 -0
- package/lib/no-consecutive-br/meta.d.ts +1 -0
- package/lib/no-consecutive-br/meta.js +1 -0
- package/lib/no-default-value/index.d.ts +7 -0
- package/lib/no-default-value/index.js +7 -0
- package/lib/no-default-value/meta.d.ts +1 -0
- package/lib/no-default-value/meta.js +1 -0
- package/lib/no-duplicate-dt/index.d.ts +6 -0
- package/lib/no-duplicate-dt/index.js +6 -0
- package/lib/no-duplicate-dt/meta.d.ts +1 -0
- package/lib/no-duplicate-dt/meta.js +1 -0
- package/lib/no-empty-palpable-content/index.d.ts +13 -0
- package/lib/no-empty-palpable-content/index.js +12 -0
- package/lib/no-empty-palpable-content/meta.d.ts +1 -0
- package/lib/no-empty-palpable-content/meta.js +1 -0
- package/lib/no-hard-code-id/index.d.ts +8 -0
- package/lib/no-hard-code-id/index.js +8 -0
- package/lib/no-hard-code-id/meta.d.ts +1 -0
- package/lib/no-hard-code-id/meta.js +1 -0
- package/lib/no-orphaned-end-tag/index.d.ts +7 -0
- package/lib/no-orphaned-end-tag/index.js +8 -2
- package/lib/no-orphaned-end-tag/meta.d.ts +1 -0
- package/lib/no-orphaned-end-tag/meta.js +1 -0
- package/lib/no-refer-to-non-existent-id/index.d.ts +9 -1
- package/lib/no-refer-to-non-existent-id/index.js +11 -2
- package/lib/no-refer-to-non-existent-id/meta.d.ts +1 -0
- package/lib/no-refer-to-non-existent-id/meta.js +1 -0
- package/lib/no-unsupported-features/compat-data.d.ts +71 -0
- package/lib/no-unsupported-features/compat-data.js +204 -0
- package/lib/no-unsupported-features/index.d.ts +24 -0
- package/lib/no-unsupported-features/index.js +139 -0
- package/lib/no-unsupported-features/meta.d.ts +5 -0
- package/lib/no-unsupported-features/meta.js +4 -0
- package/lib/no-unsupported-features/resolve-browsers.d.ts +30 -0
- package/lib/no-unsupported-features/resolve-browsers.js +125 -0
- package/lib/no-use-event-handler-attr/index.d.ts +10 -0
- package/lib/no-use-event-handler-attr/index.js +8 -0
- package/lib/no-use-event-handler-attr/meta.d.ts +1 -0
- package/lib/no-use-event-handler-attr/meta.js +1 -0
- package/lib/permitted-contents/choice.d.ts +17 -0
- package/lib/permitted-contents/choice.js +31 -1
- package/lib/permitted-contents/complex-branch.d.ts +11 -7
- package/lib/permitted-contents/complex-branch.js +11 -7
- package/lib/permitted-contents/content-model.d.ts +11 -0
- package/lib/permitted-contents/content-model.js +32 -0
- package/lib/permitted-contents/count-pattern.d.ts +13 -7
- package/lib/permitted-contents/count-pattern.js +24 -8
- package/lib/permitted-contents/debug.browser.d.ts +12 -0
- package/lib/permitted-contents/debug.browser.js +12 -0
- package/lib/permitted-contents/debug.d.ts +12 -0
- package/lib/permitted-contents/debug.js +12 -0
- package/lib/permitted-contents/index.d.ts +12 -0
- package/lib/permitted-contents/index.js +21 -0
- package/lib/permitted-contents/matches-selector.d.ts +19 -0
- package/lib/permitted-contents/matches-selector.js +33 -0
- package/lib/permitted-contents/meta.d.ts +1 -0
- package/lib/permitted-contents/meta.js +1 -0
- package/lib/permitted-contents/order.d.ts +14 -7
- package/lib/permitted-contents/order.js +15 -8
- package/lib/permitted-contents/recursive-branch.d.ts +17 -0
- package/lib/permitted-contents/recursive-branch.js +17 -0
- package/lib/permitted-contents/represent-transparent-nodes.d.ts +54 -0
- package/lib/permitted-contents/represent-transparent-nodes.js +119 -12
- package/lib/permitted-contents/start.d.ts +12 -6
- package/lib/permitted-contents/start.js +12 -6
- package/lib/permitted-contents/transparent.d.ts +12 -0
- package/lib/permitted-contents/transparent.js +12 -0
- package/lib/permitted-contents/types.d.ts +67 -0
- package/lib/permitted-contents/utils.d.ts +160 -0
- package/lib/permitted-contents/utils.js +216 -35
- package/lib/placeholder-label-option/index.d.ts +7 -0
- package/lib/placeholder-label-option/index.js +19 -15
- package/lib/placeholder-label-option/meta.d.ts +1 -0
- package/lib/placeholder-label-option/meta.js +1 -0
- package/lib/redundant-accessible-name/index.d.ts +10 -0
- package/lib/redundant-accessible-name/index.js +123 -0
- package/lib/redundant-accessible-name/meta.d.ts +5 -0
- package/lib/redundant-accessible-name/meta.js +4 -0
- package/lib/require-accessible-name/index.d.ts +10 -4
- package/lib/require-accessible-name/index.js +13 -5
- package/lib/require-accessible-name/meta.d.ts +1 -0
- package/lib/require-accessible-name/meta.js +1 -0
- package/lib/require-datetime/index.d.ts +12 -0
- package/lib/require-datetime/index.js +8 -0
- package/lib/require-datetime/meta.d.ts +1 -0
- package/lib/require-datetime/meta.js +1 -0
- package/lib/require-datetime/types.d.ts +7 -0
- package/lib/require-datetime/utils.d.ts +18 -5
- package/lib/require-datetime/utils.js +53 -9
- package/lib/require-dialog-autofocus/index.d.ts +22 -0
- package/lib/require-dialog-autofocus/index.js +62 -0
- package/lib/require-dialog-autofocus/meta.d.ts +5 -0
- package/lib/require-dialog-autofocus/meta.js +4 -0
- package/lib/required-attr/index.d.ts +21 -1
- package/lib/required-attr/index.js +34 -4
- package/lib/required-attr/meta.d.ts +1 -0
- package/lib/required-attr/meta.js +1 -0
- package/lib/required-element/index.d.ts +14 -0
- package/lib/required-element/index.js +14 -2
- package/lib/required-element/meta.d.ts +1 -0
- package/lib/required-element/meta.js +1 -0
- package/lib/required-h1/index.d.ts +12 -0
- package/lib/required-h1/index.js +7 -0
- package/lib/required-h1/meta.d.ts +1 -0
- package/lib/required-h1/meta.js +1 -0
- package/lib/srcset-sizes-constraint/index.d.ts +6 -0
- package/lib/srcset-sizes-constraint/index.js +108 -0
- package/lib/srcset-sizes-constraint/meta.d.ts +5 -0
- package/lib/srcset-sizes-constraint/meta.js +4 -0
- package/lib/srcset-sizes-constraint/parse-srcset.d.ts +40 -0
- package/lib/srcset-sizes-constraint/parse-srcset.js +56 -0
- package/lib/table-row-column-alignment/find-children.d.ts +10 -0
- package/lib/table-row-column-alignment/find-children.js +11 -0
- package/lib/table-row-column-alignment/grid.d.ts +60 -0
- package/lib/table-row-column-alignment/grid.js +104 -26
- package/lib/table-row-column-alignment/index.d.ts +8 -0
- package/lib/table-row-column-alignment/index.js +8 -0
- package/lib/table-row-column-alignment/meta.d.ts +1 -0
- package/lib/table-row-column-alignment/meta.js +1 -0
- package/lib/table-row-column-alignment/types.d.ts +10 -0
- package/lib/use-list/index.d.ts +16 -0
- package/lib/use-list/index.js +20 -0
- package/lib/use-list/meta.d.ts +1 -0
- package/lib/use-list/meta.js +1 -0
- package/lib/wai-aria/checkings/abstract-role.d.ts +9 -0
- package/lib/wai-aria/checkings/abstract-role.js +14 -2
- package/lib/wai-aria/checkings/default-value.d.ts +11 -0
- package/lib/wai-aria/checkings/default-value.js +11 -0
- package/lib/wai-aria/checkings/deprecated-props.d.ts +11 -0
- package/lib/wai-aria/checkings/deprecated-props.js +11 -0
- package/lib/wai-aria/checkings/deprecated-role.d.ts +10 -0
- package/lib/wai-aria/checkings/deprecated-role.js +10 -0
- package/lib/wai-aria/checkings/disallowed-prop.d.ts +14 -0
- package/lib/wai-aria/checkings/disallowed-prop.js +19 -2
- package/lib/wai-aria/checkings/implicit-props.d.ts +13 -0
- package/lib/wai-aria/checkings/implicit-props.js +13 -0
- package/lib/wai-aria/checkings/implicit-role.d.ts +9 -0
- package/lib/wai-aria/checkings/implicit-role.js +14 -2
- package/lib/wai-aria/checkings/interaction-in-hidden.d.ts +9 -0
- package/lib/wai-aria/checkings/interaction-in-hidden.js +15 -4
- package/lib/wai-aria/checkings/no-global-prop.d.ts +10 -0
- package/lib/wai-aria/checkings/no-global-prop.js +10 -0
- package/lib/wai-aria/checkings/non-existent-role.d.ts +11 -0
- package/lib/wai-aria/checkings/non-existent-role.js +19 -2
- package/lib/wai-aria/checkings/permitted-roles.d.ts +10 -0
- package/lib/wai-aria/checkings/permitted-roles.js +15 -2
- package/lib/wai-aria/checkings/presentational-children.d.ts +7 -1
- package/lib/wai-aria/checkings/presentational-children.js +17 -3
- package/lib/wai-aria/checkings/required-accessibility-parent-role.d.ts +25 -0
- package/lib/wai-aria/checkings/required-accessibility-parent-role.js +56 -0
- package/lib/wai-aria/checkings/required-owned-elements.d.ts +10 -1
- package/lib/wai-aria/checkings/required-owned-elements.js +69 -25
- package/lib/wai-aria/checkings/required-prop.d.ts +13 -0
- package/lib/wai-aria/checkings/required-prop.js +18 -2
- package/lib/wai-aria/checkings/value.d.ts +23 -0
- package/lib/wai-aria/checkings/value.js +32 -0
- package/lib/wai-aria/index.d.ts +10 -0
- package/lib/wai-aria/index.js +22 -4
- package/lib/wai-aria/meta.d.ts +1 -0
- package/lib/wai-aria/meta.js +1 -0
- package/lib/wai-aria/types.d.ts +25 -1
- package/package.json +16 -11
- package/schema.json +18 -0
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { getComputedRole, isRequiredOwnedElement } from '@markuplint/ml-spec';
|
|
1
|
+
import { ARIA_RECOMMENDED_VERSION, getComputedRole, isRequiredOwnedElement, isTransparentForOwnership, } from '@markuplint/ml-spec';
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Checks whether an element with a role that has "Allowed Accessibility Child Roles"
|
|
4
|
+
* (called "Required Owned Elements" in ARIA 1.2) actually contains children
|
|
5
|
+
* with the expected roles.
|
|
6
|
+
*
|
|
7
|
+
* For example, a `list` role must own at least one element with the `listitem` role.
|
|
8
|
+
* This checker respects `aria-busy="true"` (which signals that content is still loading),
|
|
9
|
+
* preprocessor blocks, and mutable children from template engines.
|
|
4
10
|
*
|
|
5
11
|
* @see https://w3c.github.io/aria/#mustContain
|
|
12
|
+
* @param el - The element node to inspect for allowed accessibility child roles.
|
|
13
|
+
* @param role - The computed ARIA role of the element, which defines allowed accessibility child roles.
|
|
14
|
+
* @returns A violation if the role requires owned elements and none are found.
|
|
6
15
|
*/
|
|
7
16
|
export const checkingRequiredOwnedElements = ({ el, role }) => t => {
|
|
8
17
|
if (!role) {
|
|
9
18
|
return;
|
|
10
19
|
}
|
|
11
|
-
if (role.
|
|
20
|
+
if (role.allowedAccessibilityChildRoles.length === 0) {
|
|
12
21
|
return;
|
|
13
22
|
}
|
|
14
23
|
/**
|
|
@@ -25,22 +34,8 @@ export const checkingRequiredOwnedElements = ({ el, role }) => t => {
|
|
|
25
34
|
return;
|
|
26
35
|
}
|
|
27
36
|
// TODO: Needs to resolve `aria-own`
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
if (child.matches('[aria-busy="true" i]')) {
|
|
31
|
-
return [child, 'BUSY'];
|
|
32
|
-
}
|
|
33
|
-
const computedChild = getComputedRole(child.ownerMLDocument.specs, child, child.rule.options.version);
|
|
34
|
-
if (role.requiredOwnedElements.some(ownedRole => isRequiredOwnedElement(computedChild.el, computedChild.role, ownedRole, child.ownerMLDocument.specs, child.rule.options.version))) {
|
|
35
|
-
return [child, 'REQUIRED'];
|
|
36
|
-
}
|
|
37
|
-
return [child, 'OTHER'];
|
|
38
|
-
}
|
|
39
|
-
else if (child.is(child.MARKUPLINT_PREPROCESSOR_BLOCK)) {
|
|
40
|
-
return [child, 'PB'];
|
|
41
|
-
}
|
|
42
|
-
return [null, 'NO_ELEMENT'];
|
|
43
|
-
});
|
|
37
|
+
const ariaVersion = el.rule.options?.version ?? el.ownerMLDocument.ruleCommonSettings?.ariaVersion ?? ARIA_RECOMMENDED_VERSION;
|
|
38
|
+
const children = classifyChildren(el, role, ariaVersion);
|
|
44
39
|
if (children.some(([, type]) => type === 'BUSY')) {
|
|
45
40
|
return;
|
|
46
41
|
}
|
|
@@ -75,18 +70,25 @@ export const checkingRequiredOwnedElements = ({ el, role }) => t => {
|
|
|
75
70
|
if (mayBeBeforeCreated(el)) {
|
|
76
71
|
return {
|
|
77
72
|
scope: el,
|
|
78
|
-
message: t('{0}. Or, {1}', t('{0} requires {1}', t('the {0}', 'child element'), role.
|
|
79
|
-
? t('the "{0*}" {1}', role.
|
|
80
|
-
: t('the {0}', 'roles') + `: ${t(role.
|
|
73
|
+
message: t('{0}. Or, {1}', t('{0} requires {1}', t('the {0}', 'child element'), role.allowedAccessibilityChildRoles.length === 1 && role.allowedAccessibilityChildRoles[0]
|
|
74
|
+
? t('the "{0*}" {1}', role.allowedAccessibilityChildRoles[0], 'role')
|
|
75
|
+
: t('the {0}', 'roles') + `: ${t(role.allowedAccessibilityChildRoles)}`), t('require {0}', 'aria-busy="true"')),
|
|
81
76
|
};
|
|
82
77
|
}
|
|
83
78
|
return {
|
|
84
79
|
scope: el,
|
|
85
|
-
message: t('{0} expects {1}', t('the "{0*}" {1}', role.name, 'role'), role.
|
|
86
|
-
? t('the "{0*}" {1}', role.
|
|
87
|
-
: t('the {0}', 'roles') + `: ${t(role.
|
|
80
|
+
message: t('{0} expects {1}', t('the "{0*}" {1}', role.name, 'role'), role.allowedAccessibilityChildRoles.length === 1 && role.allowedAccessibilityChildRoles[0]
|
|
81
|
+
? t('the "{0*}" {1}', role.allowedAccessibilityChildRoles[0], 'role')
|
|
82
|
+
: t('the {0}', 'roles') + `: ${t(role.allowedAccessibilityChildRoles)}`),
|
|
88
83
|
};
|
|
89
84
|
};
|
|
85
|
+
/**
|
|
86
|
+
* Determines whether the element's children may not yet exist (e.g., empty or
|
|
87
|
+
* containing only `<script>` / `<template>` elements that could dynamically create content).
|
|
88
|
+
*
|
|
89
|
+
* @param el - The element to inspect.
|
|
90
|
+
* @returns `true` if the element is empty or only contains script/template children.
|
|
91
|
+
*/
|
|
90
92
|
function mayBeBeforeCreated(
|
|
91
93
|
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
92
94
|
el) {
|
|
@@ -97,3 +99,45 @@ el) {
|
|
|
97
99
|
return ['script', 'template'].includes(child.localName);
|
|
98
100
|
});
|
|
99
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Classifies the child nodes of an element for "Allowed Accessibility Child Roles" validation.
|
|
104
|
+
*
|
|
105
|
+
* In ARIA 1.3, elements whose computed role is transparent for ownership
|
|
106
|
+
* (e.g., `generic`) are traversed recursively so that their descendants
|
|
107
|
+
* are evaluated as if they were direct children of the owning element.
|
|
108
|
+
*
|
|
109
|
+
* @param el - The parent element whose children to classify.
|
|
110
|
+
* @param role - The ARIA role of the parent, which defines allowed child roles.
|
|
111
|
+
* @param version - The WAI-ARIA version for version-gated transparency behavior.
|
|
112
|
+
* @returns An array of classified child nodes.
|
|
113
|
+
*/
|
|
114
|
+
function classifyChildren(
|
|
115
|
+
// eslint-disable-next-line @typescript-eslint/prefer-readonly-parameter-types
|
|
116
|
+
el, role, version) {
|
|
117
|
+
const result = [];
|
|
118
|
+
for (const child of el.childNodes) {
|
|
119
|
+
if (child.is(child.ELEMENT_NODE)) {
|
|
120
|
+
if (child.matches('[aria-busy="true" i]')) {
|
|
121
|
+
result.push([child, 'BUSY']);
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
const computedChild = getComputedRole(child.ownerMLDocument.specs, child, version);
|
|
125
|
+
if (role.allowedAccessibilityChildRoles.some(ownedRole => isRequiredOwnedElement(computedChild.el, computedChild.role, ownedRole, child.ownerMLDocument.specs, version))) {
|
|
126
|
+
result.push([child, 'REQUIRED']);
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
if (isTransparentForOwnership(computedChild.role?.name, version)) {
|
|
130
|
+
result.push(...classifyChildren(child, role, version));
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
result.push([child, 'OTHER']);
|
|
134
|
+
}
|
|
135
|
+
else if (child.is(child.MARKUPLINT_PREPROCESSOR_BLOCK)) {
|
|
136
|
+
result.push([child, 'PB']);
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
result.push([null, 'NO_ELEMENT']);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
return result;
|
|
143
|
+
}
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import type { Options } from '../types.js';
|
|
2
2
|
import type { ElementChecker } from '@markuplint/ml-core';
|
|
3
3
|
import { type ARIAProperty, type ARIARole } from '@markuplint/ml-spec';
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether all required ARIA properties for the element's computed role are present.
|
|
6
|
+
*
|
|
7
|
+
* Each ARIA role may define required states and properties (e.g., `slider` requires
|
|
8
|
+
* `aria-valuenow`). This checker verifies that explicitly-set roles have their required
|
|
9
|
+
* properties. Implicit roles are skipped since the browser provides default semantics.
|
|
10
|
+
* Alternative native HTML attributes that satisfy the requirement are also considered.
|
|
11
|
+
*
|
|
12
|
+
* @param el - The element node to inspect for required properties.
|
|
13
|
+
* @param role - The computed ARIA role (with an optional `isImplicit` flag).
|
|
14
|
+
* @param propSpecs - The list of ARIA property specifications for type lookup.
|
|
15
|
+
* @returns A violation if a required property is missing and no native alternative is present.
|
|
16
|
+
*/
|
|
4
17
|
export declare const checkingRequiredProp: ElementChecker<boolean, Options, {
|
|
5
18
|
role?: (ARIARole & {
|
|
6
19
|
isImplicit?: boolean;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
|
-
import { getARIA } from '@markuplint/ml-spec';
|
|
1
|
+
import { ARIA_RECOMMENDED_VERSION, getARIA } from '@markuplint/ml-spec';
|
|
2
|
+
/**
|
|
3
|
+
* Checks whether all required ARIA properties for the element's computed role are present.
|
|
4
|
+
*
|
|
5
|
+
* Each ARIA role may define required states and properties (e.g., `slider` requires
|
|
6
|
+
* `aria-valuenow`). This checker verifies that explicitly-set roles have their required
|
|
7
|
+
* properties. Implicit roles are skipped since the browser provides default semantics.
|
|
8
|
+
* Alternative native HTML attributes that satisfy the requirement are also considered.
|
|
9
|
+
*
|
|
10
|
+
* @param el - The element node to inspect for required properties.
|
|
11
|
+
* @param role - The computed ARIA role (with an optional `isImplicit` flag).
|
|
12
|
+
* @param propSpecs - The list of ARIA property specifications for type lookup.
|
|
13
|
+
* @returns A violation if a required property is missing and no native alternative is present.
|
|
14
|
+
*/
|
|
2
15
|
export const checkingRequiredProp = ({ el, role, propSpecs }) => t => {
|
|
3
16
|
if (!role) {
|
|
4
17
|
return;
|
|
@@ -14,7 +27,10 @@ export const checkingRequiredProp = ({ el, role, propSpecs }) => t => {
|
|
|
14
27
|
});
|
|
15
28
|
if (!has) {
|
|
16
29
|
const propSpec = propSpecs.find(p => p.name === requiredProp);
|
|
17
|
-
const
|
|
30
|
+
const ariaVersion = el.rule.options?.version ??
|
|
31
|
+
el.ownerMLDocument.ruleCommonSettings?.ariaVersion ??
|
|
32
|
+
ARIA_RECOMMENDED_VERSION;
|
|
33
|
+
const elAriaSpec = getARIA(el.ownerMLDocument.specs, el.localName, el.namespaceURI, ariaVersion, el.matches.bind(el));
|
|
18
34
|
const alt = elAriaSpec?.properties === false
|
|
19
35
|
? null
|
|
20
36
|
: (elAriaSpec?.properties?.without?.find(p => p.name === requiredProp)?.alt ?? null);
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
import type { Options } from '../types.js';
|
|
2
2
|
import type { AttrChecker } from '@markuplint/ml-core';
|
|
3
3
|
import type { ARIAProperty, ARIARole } from '@markuplint/ml-spec';
|
|
4
|
+
/**
|
|
5
|
+
* Checks whether the value of an ARIA property or state conforms to its expected type.
|
|
6
|
+
*
|
|
7
|
+
* ARIA properties have specific value types (token, token list, true/false, tristate,
|
|
8
|
+
* integer, number, string, ID reference, etc.). This checker validates the attribute
|
|
9
|
+
* value against the property's expected type and allowed enum values.
|
|
10
|
+
* Role-specific conditional value types are also considered.
|
|
11
|
+
*
|
|
12
|
+
* @param attr - The ARIA attribute node to inspect.
|
|
13
|
+
* @param role - The computed ARIA role, used to resolve conditional value types.
|
|
14
|
+
* @param propSpecs - The list of ARIA property specifications for value type lookup.
|
|
15
|
+
* @param booleanish - Whether the document supports booleanish attribute values (e.g., JSX).
|
|
16
|
+
* @returns A violation if the attribute value does not match the expected type.
|
|
17
|
+
*/
|
|
4
18
|
export declare const checkingValue: AttrChecker<boolean, Options, {
|
|
5
19
|
role?: ARIARole | null;
|
|
6
20
|
propSpecs: readonly ARIAProperty[];
|
|
7
21
|
booleanish?: boolean;
|
|
8
22
|
}>;
|
|
9
23
|
/**
|
|
24
|
+
* Validates a raw ARIA value against the expected value type defined in the specification.
|
|
25
|
+
*
|
|
26
|
+
* Supports token, token list, string, ID reference, true/false, tristate,
|
|
27
|
+
* true/false/undefined, integer, and number value types.
|
|
10
28
|
*
|
|
11
29
|
* @see https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value
|
|
30
|
+
* @param type - The ARIA value type (e.g., `"token"`, `"true/false"`, `"integer"`).
|
|
31
|
+
* @param value - The raw attribute value to validate.
|
|
32
|
+
* @param tokenEnum - The list of allowed token values for token-based types.
|
|
33
|
+
* @param booleanish - Whether empty string is accepted as a boolean `true` value.
|
|
34
|
+
* @returns `true` if the value is valid for the given type, `false` otherwise.
|
|
12
35
|
*/
|
|
13
36
|
export declare function checkAriaValue(type: string, value: string, tokenEnum: readonly string[], booleanish?: boolean): boolean;
|
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks whether the value of an ARIA property or state conforms to its expected type.
|
|
3
|
+
*
|
|
4
|
+
* ARIA properties have specific value types (token, token list, true/false, tristate,
|
|
5
|
+
* integer, number, string, ID reference, etc.). This checker validates the attribute
|
|
6
|
+
* value against the property's expected type and allowed enum values.
|
|
7
|
+
* Role-specific conditional value types are also considered.
|
|
8
|
+
*
|
|
9
|
+
* @param attr - The ARIA attribute node to inspect.
|
|
10
|
+
* @param role - The computed ARIA role, used to resolve conditional value types.
|
|
11
|
+
* @param propSpecs - The list of ARIA property specifications for value type lookup.
|
|
12
|
+
* @param booleanish - Whether the document supports booleanish attribute values (e.g., JSX).
|
|
13
|
+
* @returns A violation if the attribute value does not match the expected type.
|
|
14
|
+
*/
|
|
1
15
|
export const checkingValue = ({ attr, role, propSpecs, booleanish }) => t => {
|
|
2
16
|
if (attr.isDynamicValue) {
|
|
3
17
|
return;
|
|
@@ -15,6 +29,15 @@ export const checkingValue = ({ attr, role, propSpecs, booleanish }) => t => {
|
|
|
15
29
|
: ''),
|
|
16
30
|
};
|
|
17
31
|
};
|
|
32
|
+
/**
|
|
33
|
+
* Validates an ARIA property value against its specification, considering role-specific conditional types.
|
|
34
|
+
*
|
|
35
|
+
* @param propSpec - The ARIA property specification, or `undefined` if the property is unknown.
|
|
36
|
+
* @param currentValue - The current attribute value to validate.
|
|
37
|
+
* @param role - The name of the computed role, used to resolve conditional value types.
|
|
38
|
+
* @param booleanish - Whether booleanish values (empty string as `true`) are accepted.
|
|
39
|
+
* @returns An object containing the validation result and, for enum types, the allowed values.
|
|
40
|
+
*/
|
|
18
41
|
function checkAria(propSpec, currentValue, role, booleanish) {
|
|
19
42
|
if (!propSpec) {
|
|
20
43
|
return {
|
|
@@ -40,8 +63,17 @@ function checkAria(propSpec, currentValue, role, booleanish) {
|
|
|
40
63
|
};
|
|
41
64
|
}
|
|
42
65
|
/**
|
|
66
|
+
* Validates a raw ARIA value against the expected value type defined in the specification.
|
|
67
|
+
*
|
|
68
|
+
* Supports token, token list, string, ID reference, true/false, tristate,
|
|
69
|
+
* true/false/undefined, integer, and number value types.
|
|
43
70
|
*
|
|
44
71
|
* @see https://www.w3.org/TR/wai-aria-1.2/#propcharacteristic_value
|
|
72
|
+
* @param type - The ARIA value type (e.g., `"token"`, `"true/false"`, `"integer"`).
|
|
73
|
+
* @param value - The raw attribute value to validate.
|
|
74
|
+
* @param tokenEnum - The list of allowed token values for token-based types.
|
|
75
|
+
* @param booleanish - Whether empty string is accepted as a boolean `true` value.
|
|
76
|
+
* @returns `true` if the value is valid for the given type, `false` otherwise.
|
|
45
77
|
*/
|
|
46
78
|
export function checkAriaValue(type, value, tokenEnum, booleanish) {
|
|
47
79
|
switch (type) {
|
package/lib/wai-aria/index.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
1
|
import type { Options } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* WAI-ARIA rule for markuplint.
|
|
4
|
+
*
|
|
5
|
+
* Validates the correct usage of WAI-ARIA roles, states, and properties
|
|
6
|
+
* on HTML elements. This rule performs a comprehensive set of checks including
|
|
7
|
+
* role validity, property values, required owned elements, and conformance
|
|
8
|
+
* with the ARIA in HTML specification.
|
|
9
|
+
*
|
|
10
|
+
* Individual checks can be toggled on or off via the rule's options.
|
|
11
|
+
*/
|
|
2
12
|
declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
|
|
3
13
|
export default _default;
|
package/lib/wai-aria/index.js
CHANGED
|
@@ -13,10 +13,21 @@ import { checkingNoGlobalProp } from './checkings/no-global-prop.js';
|
|
|
13
13
|
import { checkingNonExistentRole } from './checkings/non-existent-role.js';
|
|
14
14
|
import { checkingPermittedRoles } from './checkings/permitted-roles.js';
|
|
15
15
|
import { checkingPresentationalChildren } from './checkings/presentational-children.js';
|
|
16
|
+
import { checkingRequiredAccessibilityParentRole } from './checkings/required-accessibility-parent-role.js';
|
|
16
17
|
import { checkingRequiredOwnedElements } from './checkings/required-owned-elements.js';
|
|
17
18
|
import { checkingRequiredProp } from './checkings/required-prop.js';
|
|
18
19
|
import { checkingValue } from './checkings/value.js';
|
|
19
20
|
import meta from './meta.js';
|
|
21
|
+
/**
|
|
22
|
+
* WAI-ARIA rule for markuplint.
|
|
23
|
+
*
|
|
24
|
+
* Validates the correct usage of WAI-ARIA roles, states, and properties
|
|
25
|
+
* on HTML elements. This rule performs a comprehensive set of checks including
|
|
26
|
+
* role validity, property values, required owned elements, and conformance
|
|
27
|
+
* with the ARIA in HTML specification.
|
|
28
|
+
*
|
|
29
|
+
* Individual checks can be toggled on or off via the rule's options.
|
|
30
|
+
*/
|
|
20
31
|
export default createRule({
|
|
21
32
|
meta: meta,
|
|
22
33
|
defaultOptions: {
|
|
@@ -24,13 +35,15 @@ export default createRule({
|
|
|
24
35
|
checkingDeprecatedRole: true,
|
|
25
36
|
checkingDeprecatedProps: true,
|
|
26
37
|
permittedAriaRoles: true,
|
|
38
|
+
checkingAllowedAccessibilityChildRoles: true,
|
|
27
39
|
checkingRequiredOwnedElements: true,
|
|
40
|
+
checkingRequiredAccessibilityParentRole: true,
|
|
28
41
|
checkingPresentationalChildren: false,
|
|
29
42
|
checkingInteractionInHidden: false,
|
|
30
43
|
disallowSetImplicitRole: true,
|
|
31
44
|
disallowSetImplicitProps: true,
|
|
32
45
|
disallowDefaultValue: false,
|
|
33
|
-
version:
|
|
46
|
+
version: undefined,
|
|
34
47
|
},
|
|
35
48
|
async verify({ document, report, t }) {
|
|
36
49
|
await document.walkOn('Element', el => {
|
|
@@ -50,8 +63,9 @@ export default createRule({
|
|
|
50
63
|
}
|
|
51
64
|
return;
|
|
52
65
|
}
|
|
53
|
-
const
|
|
54
|
-
const
|
|
66
|
+
const ariaVersion = el.rule.options?.version ?? document.ruleCommonSettings?.ariaVersion ?? ARIA_RECOMMENDED_VERSION;
|
|
67
|
+
const computed = getComputedRole(document.specs, el, ariaVersion);
|
|
68
|
+
const { props: propSpecs } = ariaSpecs(document.specs, ariaVersion);
|
|
55
69
|
if (roleAttr) {
|
|
56
70
|
if (report(checkingNonExistentRole({ attr: roleAttr }))) {
|
|
57
71
|
return;
|
|
@@ -59,6 +73,9 @@ export default createRule({
|
|
|
59
73
|
if (report(checkingAbstractRole({ attr: roleAttr }))) {
|
|
60
74
|
return;
|
|
61
75
|
}
|
|
76
|
+
if (el.rule.options.checkingRequiredAccessibilityParentRole) {
|
|
77
|
+
report(checkingRequiredAccessibilityParentRole({ el, computed }));
|
|
78
|
+
}
|
|
62
79
|
report(checkingRequiredProp({ el, role: computed.role, propSpecs }));
|
|
63
80
|
if (el.rule.options.checkingDeprecatedRole) {
|
|
64
81
|
report(checkingDeprecatedRole({ attr: roleAttr, role: computed.role }));
|
|
@@ -94,7 +111,8 @@ export default createRule({
|
|
|
94
111
|
report(checkingNoGlobalProp({ attr, propSpecs }));
|
|
95
112
|
}
|
|
96
113
|
}
|
|
97
|
-
if (el.rule.options.
|
|
114
|
+
if (el.rule.options.checkingAllowedAccessibilityChildRoles &&
|
|
115
|
+
el.rule.options.checkingRequiredOwnedElements) {
|
|
98
116
|
report(checkingRequiredOwnedElements({ el, role: computed.role }));
|
|
99
117
|
}
|
|
100
118
|
if (el.rule.options.checkingPresentationalChildren) {
|
package/lib/wai-aria/meta.d.ts
CHANGED
package/lib/wai-aria/meta.js
CHANGED
package/lib/wai-aria/types.d.ts
CHANGED
|
@@ -1,14 +1,38 @@
|
|
|
1
1
|
import type { ARIAVersion } from '@markuplint/ml-spec';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration options for the `wai-aria` rule.
|
|
4
|
+
*
|
|
5
|
+
* Each boolean flag enables or disables a specific WAI-ARIA validation check.
|
|
6
|
+
* The `version` field determines which ARIA specification version to validate against.
|
|
7
|
+
*/
|
|
2
8
|
export type Options = {
|
|
9
|
+
/** Whether to validate ARIA property and state values against their expected types. */
|
|
3
10
|
checkingValue: boolean;
|
|
11
|
+
/** Whether to report usage of deprecated ARIA properties and states. */
|
|
4
12
|
checkingDeprecatedProps: boolean;
|
|
13
|
+
/** Whether to report usage of deprecated ARIA roles. */
|
|
5
14
|
checkingDeprecatedRole: boolean;
|
|
15
|
+
/** Whether to enforce the list of permitted ARIA roles for each element. */
|
|
6
16
|
permittedAriaRoles: boolean;
|
|
17
|
+
/** Whether to verify "Allowed Accessibility Child Roles" (ARIA 1.3 name). */
|
|
18
|
+
checkingAllowedAccessibilityChildRoles: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated Use `checkingAllowedAccessibilityChildRoles` instead.
|
|
21
|
+
* Retained for backward compatibility.
|
|
22
|
+
*/
|
|
7
23
|
checkingRequiredOwnedElements: boolean;
|
|
24
|
+
/** Whether to verify "Required Accessibility Parent Role" (ARIA 1.3 name) / "Required Context Role" (ARIA 1.2 name). */
|
|
25
|
+
checkingRequiredAccessibilityParentRole: boolean;
|
|
26
|
+
/** Whether to warn when ARIA attributes are set on descendants of presentational-children roles. */
|
|
8
27
|
checkingPresentationalChildren: boolean;
|
|
28
|
+
/** Whether to warn about focusable interactive elements hidden via `aria-hidden`. */
|
|
9
29
|
checkingInteractionInHidden: boolean;
|
|
30
|
+
/** Whether to disallow explicitly setting a role that matches the element's implicit role. */
|
|
10
31
|
disallowSetImplicitRole: boolean;
|
|
32
|
+
/** Whether to disallow explicitly setting ARIA properties that duplicate the element's native semantics. */
|
|
11
33
|
disallowSetImplicitProps: boolean;
|
|
34
|
+
/** Whether to disallow explicitly setting an ARIA property to its default value. */
|
|
12
35
|
disallowDefaultValue: boolean;
|
|
13
|
-
version
|
|
36
|
+
/** The WAI-ARIA specification version to validate against. */
|
|
37
|
+
version?: ARIAVersion;
|
|
14
38
|
};
|
package/package.json
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/rules",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0-alpha.0",
|
|
4
4
|
"description": "Built-in rules of markuplint",
|
|
5
5
|
"repository": "git@github.com:markuplint/markuplint.git",
|
|
6
6
|
"author": "Yusuke Hirao <yusukehirao@me.com>",
|
|
7
7
|
"license": "MIT",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=22"
|
|
10
|
+
},
|
|
8
11
|
"type": "module",
|
|
9
12
|
"exports": {
|
|
10
13
|
".": {
|
|
@@ -24,18 +27,20 @@
|
|
|
24
27
|
"./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
|
|
25
28
|
},
|
|
26
29
|
"dependencies": {
|
|
27
|
-
"@markuplint/html-spec": "
|
|
28
|
-
"@markuplint/ml-core": "
|
|
29
|
-
"@markuplint/ml-spec": "
|
|
30
|
-
"@markuplint/selector": "
|
|
31
|
-
"@markuplint/shared": "
|
|
32
|
-
"@markuplint/types": "
|
|
30
|
+
"@markuplint/html-spec": "5.0.0-alpha.0",
|
|
31
|
+
"@markuplint/ml-core": "5.0.0-alpha.0",
|
|
32
|
+
"@markuplint/ml-spec": "5.0.0-alpha.0",
|
|
33
|
+
"@markuplint/selector": "5.0.0-alpha.0",
|
|
34
|
+
"@markuplint/shared": "5.0.0-alpha.0",
|
|
35
|
+
"@markuplint/types": "5.0.0-alpha.0",
|
|
36
|
+
"@mdn/browser-compat-data": "^7.3.2",
|
|
33
37
|
"@types/debug": "4.1.12",
|
|
34
|
-
"@ungap/structured-clone": "1.3.0",
|
|
35
38
|
"ansi-colors": "4.1.3",
|
|
36
|
-
"
|
|
39
|
+
"browserslist": "^4.28.1",
|
|
40
|
+
"chrono-node": "2.9.0",
|
|
37
41
|
"debug": "4.4.3",
|
|
38
|
-
"
|
|
42
|
+
"image-size": "^2.0.2",
|
|
43
|
+
"type-fest": "5.4.4"
|
|
39
44
|
},
|
|
40
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "13dcfc84ec83d87360c720e253383b60767e1b56"
|
|
41
46
|
}
|
package/schema.json
CHANGED
|
@@ -24,6 +24,9 @@
|
|
|
24
24
|
"class-naming": {
|
|
25
25
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/class-naming/schema.json"
|
|
26
26
|
},
|
|
27
|
+
"correct-aspect-ratio": {
|
|
28
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/correct-aspect-ratio/schema.json"
|
|
29
|
+
},
|
|
27
30
|
"deprecated-attr": {
|
|
28
31
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/deprecated-attr/schema.json"
|
|
29
32
|
},
|
|
@@ -57,6 +60,9 @@
|
|
|
57
60
|
"landmark-roles": {
|
|
58
61
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/landmark-roles/schema.json"
|
|
59
62
|
},
|
|
63
|
+
"link-types": {
|
|
64
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/link-types/schema.json"
|
|
65
|
+
},
|
|
60
66
|
"neighbor-popovers": {
|
|
61
67
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/neighbor-popovers/schema.json"
|
|
62
68
|
},
|
|
@@ -87,6 +93,9 @@
|
|
|
87
93
|
"no-refer-to-non-existent-id": {
|
|
88
94
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-refer-to-non-existent-id/schema.json"
|
|
89
95
|
},
|
|
96
|
+
"no-unsupported-features": {
|
|
97
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-unsupported-features/schema.json"
|
|
98
|
+
},
|
|
90
99
|
"no-use-event-handler-attr": {
|
|
91
100
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-use-event-handler-attr/schema.json"
|
|
92
101
|
},
|
|
@@ -96,12 +105,18 @@
|
|
|
96
105
|
"placeholder-label-option": {
|
|
97
106
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/placeholder-label-option/schema.json"
|
|
98
107
|
},
|
|
108
|
+
"redundant-accessible-name": {
|
|
109
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/redundant-accessible-name/schema.json"
|
|
110
|
+
},
|
|
99
111
|
"require-accessible-name": {
|
|
100
112
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/require-accessible-name/schema.json"
|
|
101
113
|
},
|
|
102
114
|
"require-datetime": {
|
|
103
115
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/require-datetime/schema.json"
|
|
104
116
|
},
|
|
117
|
+
"require-dialog-autofocus": {
|
|
118
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/require-dialog-autofocus/schema.json"
|
|
119
|
+
},
|
|
105
120
|
"required-attr": {
|
|
106
121
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/required-attr/schema.json"
|
|
107
122
|
},
|
|
@@ -111,6 +126,9 @@
|
|
|
111
126
|
"required-h1": {
|
|
112
127
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/required-h1/schema.json"
|
|
113
128
|
},
|
|
129
|
+
"srcset-sizes-constraint": {
|
|
130
|
+
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/srcset-sizes-constraint/schema.json"
|
|
131
|
+
},
|
|
114
132
|
"table-row-column-alignment": {
|
|
115
133
|
"$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/table-row-column-alignment/schema.json"
|
|
116
134
|
},
|