From e304d1122499a0e95edb7b2a05e30b7fb0553050 Mon Sep 17 00:00:00 2001 From: oekazuma Date: Sun, 16 Aug 2026 18:34:15 +0900 Subject: [PATCH 1/2] fix(core): treat unresolvable a11y content as unknowable, not absent Co-Authored-By: Claude Opus 5 --- .changeset/loud-pugs-attend.md | 21 +++++ docs/blume.translations.json | 4 +- .../docs/ja/rules/a11y/accessible-name.md | 7 +- .../docs/ja/rules/a11y/label-has-control.md | 2 +- .../docs/rules/a11y/accessible-name.md | 7 +- .../docs/rules/a11y/label-has-control.md | 2 +- packages/core/src/component-parse.ts | 82 +++++++++++++++---- packages/core/test/component-parse.test.ts | 26 ++++++ 8 files changed, 128 insertions(+), 23 deletions(-) create mode 100644 .changeset/loud-pugs-attend.md diff --git a/.changeset/loud-pugs-attend.md b/.changeset/loud-pugs-attend.md new file mode 100644 index 000000000..1597d636c --- /dev/null +++ b/.changeset/loud-pugs-attend.md @@ -0,0 +1,21 @@ +--- +'@svelte-vitals/core': patch +--- + +Stop `a11y/accessible-name` and `a11y/label-has-control` reporting content they cannot see. + +Both rules already skip content they cannot resolve — an expression, a component, `{@render}`, +`{@html}` — but four routes were read as _absent_ rather than _unknowable_: + +- **A `` or ``** supplies content from the parent, so `` + and `` were flagged despite being named and associated + by whoever renders them. +- **A hyphenated custom element** may be form-associated (and so labelable) and may name its host + from a shadow root, so `` was flagged. +- **An expression-valued `alt`** was invisible while an expression `aria-label` was accepted, so + the idiomatic `{siteName}` was "unnamed". +- **A `