@markuplint/ml-spec 5.0.0-alpha.2 → 5.0.0-dev.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,10 @@
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-alpha.3](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.2...v5.0.0-alpha.3) (2026-02-26)
7
+
8
+ **Note:** Version bump only for package @markuplint/ml-spec
9
+
6
10
  # [5.0.0-alpha.2](https://github.com/markuplint/markuplint/compare/v5.0.0-alpha.1...v5.0.0-alpha.2) (2026-02-23)
7
11
 
8
12
  ### Features
@@ -236,7 +236,7 @@ type ARIAAttributeValue =
236
236
  type ARIAVersion = '1.1' | '1.2' | '1.3';
237
237
  ```
238
238
 
239
- 推奨デフォルトバージョンは `'1.2'` です(`src/utils/aria-version.ts` の `ARIA_RECOMMENDED_VERSION` として定義)。
239
+ 推奨デフォルトバージョンは `'1.3'` です(`src/utils/aria-version.ts` の `ARIA_RECOMMENDED_VERSION` として定義)。
240
240
 
241
241
  ### `ComputedRole`
242
242
 
@@ -236,7 +236,7 @@ A union type of supported ARIA specification version strings, derived from the `
236
236
  type ARIAVersion = '1.1' | '1.2' | '1.3';
237
237
  ```
238
238
 
239
- The recommended default version is `'1.2'` (defined as `ARIA_RECOMMENDED_VERSION` in `src/utils/aria-version.ts`).
239
+ The recommended default version is `'1.3'` (defined as `ARIA_RECOMMENDED_VERSION` in `src/utils/aria-version.ts`).
240
240
 
241
241
  ### `ComputedRole`
242
242
 
@@ -23,7 +23,9 @@ el, specs, version) {
23
23
  * THIS CONDITION IS PARTIAL SUPPORT.
24
24
  */
25
25
  if (el.hasAttribute('aria-owns')) {
26
- // FIXME
26
+ // FIXME: Partial support — assumes aria-owns always provides required owned elements.
27
+ // A complete implementation would resolve the ID references in the aria-owns value
28
+ // and verify that the referenced elements actually have the required roles.
27
29
  return true;
28
30
  }
29
31
  /**
@@ -153,6 +153,9 @@ el, specs, version) {
153
153
  * - Elements that are a valid target of an aria-activedescendant attribute.
154
154
  */
155
155
  // TODO: Compute aria-activedescendant.
156
+ // To implement this, we need to find all elements with `aria-activedescendant`
157
+ // in the document and check if any of them reference this element's ID.
158
+ // This requires cross-element analysis that is not yet supported.
156
159
  // results.push(true);
157
160
  /**
158
161
  * Elements that have an explicit role or a global WAI-ARIA attribute and
@@ -179,7 +182,10 @@ el, specs, version) {
179
182
  * Elements that are not hidden and have an ID that is referenced
180
183
  * by another element via a WAI-ARIA property.
181
184
  */
182
- // TODO: Compute refering ID.
185
+ // TODO: Compute referring ID.
186
+ // To implement this, we need to find all ARIA relationship attributes
187
+ // (e.g., aria-labelledby, aria-describedby, aria-owns, aria-controls)
188
+ // across the document that reference this element's ID.
183
189
  // results.push(true);
184
190
  return results.includes(true);
185
191
  }
@@ -190,7 +196,9 @@ el) {
190
196
  if (!style) {
191
197
  return false;
192
198
  }
193
- // TODO: Improve accuracy
199
+ // TODO: Improve accuracy by using a proper CSS parser instead of regex.
200
+ // This regex does not handle shorthand properties, `!important`, or values
201
+ // inside comments/strings. A CSS declaration parser would be more reliable.
194
202
  return /display\s*:\s*none|visibility\s*:\s*hidden/i.test(style);
195
203
  }
196
204
  function isExposedElement(
@@ -28,7 +28,7 @@ export function getAttrSpecs(localName, namespace, schema) {
28
28
  }
29
29
  const globalAttrs = schema.def['#globalAttrs'];
30
30
  let attrs = {};
31
- for (const catName in elSpec.globalAttrs) {
31
+ for (const catName of Object.keys(elSpec.globalAttrs)) {
32
32
  // @ts-ignore
33
33
  const catAttrs = elSpec.globalAttrs[catName];
34
34
  if (catAttrs === false) {
@@ -57,7 +57,7 @@ export function getAttrSpecs(localName, namespace, schema) {
57
57
  continue;
58
58
  }
59
59
  }
60
- for (const attrName in elSpec.attributes) {
60
+ for (const attrName of Object.keys(elSpec.attributes)) {
61
61
  const attr = elSpec.attributes[attrName];
62
62
  if (!attr) {
63
63
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/ml-spec",
3
- "version": "5.0.0-alpha.2",
3
+ "version": "5.0.0-dev.5+e96392f56",
4
4
  "description": "Types and schema that specs of the Markup languages for markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -34,14 +34,14 @@
34
34
  "schema:prettier": "npx prettier --write \"./schemas/*.json\" \"./src/types/*.ts\" --log-level warn"
35
35
  },
36
36
  "dependencies": {
37
- "@markuplint/ml-ast": "5.0.0-alpha.2",
38
- "@markuplint/types": "5.0.0-alpha.2",
37
+ "@markuplint/ml-ast": "5.0.0-dev.5+e96392f56",
38
+ "@markuplint/types": "5.0.0-dev.5+e96392f56",
39
39
  "is-plain-object": "5.0.0",
40
40
  "type-fest": "5.4.4"
41
41
  },
42
42
  "devDependencies": {
43
- "@markuplint/test-tools": "5.0.0-alpha.2",
43
+ "@markuplint/test-tools": "5.0.0-alpha.3",
44
44
  "json-schema-to-typescript": "15.0.4"
45
45
  },
46
- "gitHead": "31ccf1e81443ea3f93597d287595211f1823ddcf"
46
+ "gitHead": "e96392f56e4bc8165ba59622b41c822703a96372"
47
47
  }