@markuplint/rules 5.0.0-rc.5 → 5.0.0-rc.6

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.6](https://github.com/markuplint/markuplint/compare/v5.0.0-rc.5...v5.0.0-rc.6) (2026-08-30)
7
+
8
+ ### Bug Fixes
9
+
10
+ - add no-aria-hidden-on-hidden-until-found rule (closes [#3999](https://github.com/markuplint/markuplint/issues/3999)) ([#4017](https://github.com/markuplint/markuplint/issues/4017)) ([3dfb300](https://github.com/markuplint/markuplint/commit/3dfb3001dc66452918d5cebbb071244b68779b30))
11
+
6
12
  # [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
13
 
8
14
  ### Bug Fixes
package/lib/index.d.ts CHANGED
@@ -43,6 +43,7 @@ declare const rules: {
43
43
  readonly 'no-abstract-role': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
44
44
  readonly 'no-always-matching-source': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
45
45
  readonly 'no-ambiguous-navigable-target-names': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, undefined>>;
46
+ readonly 'no-aria-hidden-on-hidden-until-found': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
46
47
  readonly 'no-aria-on-presentational-children': Readonly<import("@markuplint/ml-core").RuleSeed<boolean, import("./wai-aria/types.js").Options>>;
47
48
  readonly 'no-aria-on-unsupported-element': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
48
49
  readonly 'no-boolean-attr-value': Readonly<import("@markuplint/ml-core").RuleSeed<import("@markuplint/ml-core").RuleConfigValue, undefined>>;
package/lib/index.js CHANGED
@@ -29,6 +29,7 @@ import MeterValueBounds from './meter-value-bounds/index.js';
29
29
  import NoAbstractRole from './no-abstract-role/index.js';
30
30
  import NoAlwaysMatchingSource from './no-always-matching-source/index.js';
31
31
  import NoAmbiguousNavigableTargetNames from './no-ambiguous-navigable-target-names/index.js';
32
+ import NoAriaHiddenOnHiddenUntilFound from './no-aria-hidden-on-hidden-until-found/index.js';
32
33
  import NoAriaOnPresentationalChildren from './no-aria-on-presentational-children/index.js';
33
34
  import NoAriaOnUnsupportedElement from './no-aria-on-unsupported-element/index.js';
34
35
  import NoBooleanAttrValue from './no-boolean-attr-value/index.js';
@@ -140,6 +141,7 @@ const rules = {
140
141
  'no-abstract-role': NoAbstractRole,
141
142
  'no-always-matching-source': NoAlwaysMatchingSource,
142
143
  'no-ambiguous-navigable-target-names': NoAmbiguousNavigableTargetNames,
144
+ 'no-aria-hidden-on-hidden-until-found': NoAriaHiddenOnHiddenUntilFound,
143
145
  'no-aria-on-presentational-children': NoAriaOnPresentationalChildren,
144
146
  'no-aria-on-unsupported-element': NoAriaOnUnsupportedElement,
145
147
  'no-boolean-attr-value': NoBooleanAttrValue,
@@ -0,0 +1,12 @@
1
+ import type { Options } from '../wai-aria/types.js';
2
+ /**
3
+ * ARIA in HTML §"Rules of ARIA attribute usage by HTML feature", the `hidden` row:
4
+ * "authors MUST NOT use `aria-hidden="true"` on any element which also has the
5
+ * `hidden` attribute specified in the Hidden Until Found state." Content revealed
6
+ * by the browser's find-in-page feature would otherwise stay excluded from the
7
+ * accessibility tree, silently breaking that reveal for assistive technology users.
8
+ *
9
+ * @see https://w3c.github.io/html-aria/#att-hidden
10
+ */
11
+ declare const _default: Readonly<import("@markuplint/ml-core").RuleSeed<boolean, Options>>;
12
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import { createRule } from '@markuplint/ml-core';
2
+ import { defaultOptions } from '../wai-aria/default-options.js';
3
+ import meta from './meta.js';
4
+ /**
5
+ * ARIA in HTML §"Rules of ARIA attribute usage by HTML feature", the `hidden` row:
6
+ * "authors MUST NOT use `aria-hidden="true"` on any element which also has the
7
+ * `hidden` attribute specified in the Hidden Until Found state." Content revealed
8
+ * by the browser's find-in-page feature would otherwise stay excluded from the
9
+ * accessibility tree, silently breaking that reveal for assistive technology users.
10
+ *
11
+ * @see https://w3c.github.io/html-aria/#att-hidden
12
+ */
13
+ export default createRule({
14
+ meta,
15
+ defaultSeverity: 'error',
16
+ defaultOptions,
17
+ async verify({ document, report, t }) {
18
+ await document.walkOn('Element', el => {
19
+ const ariaHidden = el.getAttributeNode('aria-hidden');
20
+ if (!ariaHidden || ariaHidden.isDynamicValue) {
21
+ return;
22
+ }
23
+ if (ariaHidden.value.trim().toLowerCase() !== 'true') {
24
+ return;
25
+ }
26
+ if (el.getAttribute('hidden')?.trim().toLowerCase() !== 'until-found') {
27
+ return;
28
+ }
29
+ report({
30
+ scope: ariaHidden,
31
+ message: t('"aria-hidden" must not be "{0}" on an element with "hidden" value "{1}"', 'true', 'until-found'),
32
+ });
33
+ });
34
+ },
35
+ });
@@ -0,0 +1,9 @@
1
+ declare const _default: {
2
+ readonly category: "a11y";
3
+ readonly specConformance: {
4
+ readonly sources: readonly ["aria-in-html"];
5
+ readonly level: "must";
6
+ readonly cites: readonly ["https://w3c.github.io/html-aria/#att-hidden"];
7
+ };
8
+ };
9
+ export default _default;
@@ -0,0 +1,8 @@
1
+ export default {
2
+ category: 'a11y',
3
+ specConformance: {
4
+ sources: ['aria-in-html'],
5
+ level: 'must',
6
+ cites: ['https://w3c.github.io/html-aria/#att-hidden'],
7
+ },
8
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/rules",
3
- "version": "5.0.0-rc.5",
3
+ "version": "5.0.0-rc.6",
4
4
  "description": "Built-in rules of markuplint",
5
5
  "repository": {
6
6
  "type": "git",
@@ -31,13 +31,13 @@
31
31
  "./lib/permitted-contents/debug.js": "./lib/permitted-contents/debug.browser.js"
32
32
  },
33
33
  "dependencies": {
34
- "@markuplint/html-spec": "5.0.0-rc.5",
35
- "@markuplint/ml-config": "5.0.0-rc.5",
36
- "@markuplint/ml-core": "5.0.0-rc.5",
37
- "@markuplint/ml-spec": "5.0.0-rc.5",
38
- "@markuplint/selector": "5.0.0-rc.5",
39
- "@markuplint/shared": "5.0.0-rc.5",
40
- "@markuplint/types": "5.0.0-rc.5",
34
+ "@markuplint/html-spec": "5.0.0-rc.6",
35
+ "@markuplint/ml-config": "5.0.0-rc.6",
36
+ "@markuplint/ml-core": "5.0.0-rc.6",
37
+ "@markuplint/ml-spec": "5.0.0-rc.6",
38
+ "@markuplint/selector": "5.0.0-rc.6",
39
+ "@markuplint/shared": "5.0.0-rc.6",
40
+ "@markuplint/types": "5.0.0-rc.6",
41
41
  "@mdn/browser-compat-data": "^7.3.2",
42
42
  "@types/debug": "4.1.13",
43
43
  "ansi-colors": "4.1.3",
@@ -47,5 +47,5 @@
47
47
  "image-size": "^2.0.2",
48
48
  "type-fest": "5.6.0"
49
49
  },
50
- "gitHead": "8d87463af2ff3f1b83fb28da20f1819362cf3555"
50
+ "gitHead": "c02c3a0783eac6b2fb4707be2dc00b88f6219641"
51
51
  }
package/schema.json CHANGED
@@ -99,6 +99,9 @@
99
99
  "no-ambiguous-navigable-target-names": {
100
100
  "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-ambiguous-navigable-target-names/schema.json"
101
101
  },
102
+ "no-aria-hidden-on-hidden-until-found": {
103
+ "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-aria-hidden-on-hidden-until-found/schema.json"
104
+ },
102
105
  "no-aria-on-presentational-children": {
103
106
  "$ref": "https://raw.githubusercontent.com/markuplint/markuplint/main/packages/%40markuplint/rules/src/no-aria-on-presentational-children/schema.json"
104
107
  },