@svelte-vitals/core 0.49.0 → 0.50.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/README.md CHANGED
@@ -3,23 +3,23 @@
3
3
  [![npm](https://img.shields.io/npm/v/@svelte-vitals/core)](https://www.npmjs.com/package/@svelte-vitals/core)
4
4
  [![MIT](https://img.shields.io/npm/l/@svelte-vitals/core)](https://opensource.org/licenses/MIT)
5
5
 
6
- Runtime-agnostic core for [svelte-vitals](https://github.com/oekazuma/svelte-vitals): shared types, the rule engine, scorer, and reporters, plus the full rule set across six categories SEO, Performance, Correctness, Security, Architecture, Accessibility.
6
+ Runtime-agnostic core for [svelte-vitals](https://github.com/oekazuma/svelte-vitals): shared types, the rule engine, scorer, and reporters, plus the full rule set across six categories: SEO, Performance, Correctness, Security, Architecture, Accessibility.
7
7
 
8
- This package is **mode-independent** and contains no I/O it operates on a normalized `ResolvedHead[]` intermediate representation, so the same rules run unchanged whether heads come from static source analysis (the `svelte-vitals` CLI) or from prerendered HTML (the `@svelte-vitals/vite` plugin). It has zero runtime dependencies and no `node:` imports.
8
+ This package is **mode-independent** and contains no I/O. It operates on a normalized `ResolvedHead[]` intermediate representation, so the same rules run unchanged whether heads come from static source analysis (the `svelte-vitals` CLI) or from prerendered HTML (the `@svelte-vitals/vite` plugin). It has zero runtime dependencies and no `node:` imports.
9
9
 
10
- > Most users don't depend on this directly install [`svelte-vitals`](https://www.npmjs.com/package/svelte-vitals) instead. This package is for building tools on top of the shared engine.
10
+ > Most users don't depend on this directly; install [`svelte-vitals`](https://www.npmjs.com/package/svelte-vitals) instead. This package is for building tools on top of the shared engine.
11
11
 
12
12
  > **ESM-only** (Node 24.16+). Ships ES modules only; `require()` is unsupported by design.
13
13
 
14
14
  ## Entry points
15
15
 
16
- | Entry | Contents | Stability |
17
- | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
18
- | `@svelte-vitals/core` | `defineConfig` and the config types; the `JsonReport` types for reading a report; `summarize`, `hasFailureAtOrAbove`, `formatGithubReport`, `formatMarkdownReport` for rendering one and gating on it | Follows semver. For the renderers, that covers the function not the text it returns, which stays human-readable and may change. |
19
- | `@svelte-vitals/core/internal` | The engine, rules, fact collection, reporters, and scoring what the CLI and the Vite plugin share | **No guarantee. Anything here may change in any release, including a patch.** |
16
+ | Entry | Contents | Stability |
17
+ | ------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
18
+ | `@svelte-vitals/core` | `defineConfig` and the config types; the `JsonReport` types for reading a report; `summarize`, `hasFailureAtOrAbove`, `formatGithubReport`, `formatMarkdownReport` for rendering one and gating on it | Follows semver. For the renderers, that covers the function, not the text it returns, which stays human-readable and may change. |
19
+ | `@svelte-vitals/core/internal` | The engine, rules, fact collection, reporters, and scoring, which is what the CLI and the Vite plugin share | **No guarantee. Anything here may change in any release, including a patch.** |
20
20
 
21
21
  Reach for `/internal` only if you accept pinning an exact version. If something there is what you
22
- actually need, open an issue the point of the split is that promoting a name into the stable
22
+ actually need, open an issue. The point of the split is that promoting a name into the stable
23
23
  entry is an additive change.
24
24
 
25
25
  ## License
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import { Ct as RuleSetting, Dt as TreatDynamicAs, Et as Severity, Ot as Value, St as RuleOverride, at as formatGithubReport, bt as Result, dt as summarize, ft as CATEGORIES, gt as Fix, ht as Detection, it as formatMarkdownReport, jt as defineConfig, mt as Config, n as RuleEvidence, o as ScoreModel, pt as Category, st as Summary, t as JsonReport, ut as hasFailureAtOrAbove, vt as Presence, wt as RuleSettingObject, xt as RuleOptions } from "./json-pC2tDNuR.js";
1
+ import { Ct as RuleSetting, Dt as TreatDynamicAs, Et as Severity, Ot as Value, St as RuleOverride, at as formatGithubReport, bt as Result, dt as summarize, ft as CATEGORIES, gt as Fix, ht as Detection, it as formatMarkdownReport, jt as defineConfig, mt as Config, n as RuleEvidence, o as ScoreModel, pt as Category, st as Summary, t as JsonReport, ut as hasFailureAtOrAbove, vt as Presence, wt as RuleSettingObject, xt as RuleOptions } from "./json-CcKHN-tx.js";
2
2
  export { CATEGORIES, type Category, type Config, type Detection, type Fix, type JsonReport, type Presence, type Result, type RuleEvidence, type RuleOptions, type RuleOverride, type RuleSetting, type RuleSettingObject, type ScoreModel, type Severity, type Summary, type TreatDynamicAs, type Value, defineConfig, formatGithubReport, formatMarkdownReport, hasFailureAtOrAbove, summarize };
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { cr as summarize, dr as CATEGORIES, l as formatGithubReport, mr as defineConfig, sr as hasFailureAtOrAbove, t as formatMarkdownReport } from "./markdown-CP5TPy-s.js";
1
+ import { cr as hasFailureAtOrAbove, fr as CATEGORIES, hr as defineConfig, l as formatGithubReport, lr as summarize, t as formatMarkdownReport } from "./markdown-CEYpv4SU.js";
2
2
  export { CATEGORIES, defineConfig, formatGithubReport, formatMarkdownReport, hasFailureAtOrAbove, summarize };
@@ -1,4 +1,4 @@
1
- import { $ as HeadTag, A as formatFailedRuleWarning, At as defaultProject, B as IDREF_ATTRS, C as shouldSkipRangeCheck, D as applyOverrides, E as CompiledOverride, Et as Severity, F as withFailedRulesOff, Ft as OrphanEffectFact, G as isTopFragment, H as ResolvedA11y, I as KitModuleFacts, It as SourceSpan, J as HeadingInfo, K as splitTokens, L as A11yOccurrenceInfo, Lt as SuppressionDirective, M as selectRules, Mt as ComponentFacts, N as settingOptions, Nt as EachBlockFact, O as applyRuleSeverities, Ot as Value, P as settingSeverity, Pt as EffectFact, Q as HeadProvider, R as A11ySkipCause, Rt as skippedFileWarnings, S as resolveRuleOptions, T as validateRuleSetting, Tt as Scope, U as decodeFragmentId, V as LANDMARK_ROLES, W as foldOccurrences, X as ImageInfo, Y as ResolvedHeadings, Z as ResolvedImages, _ as RuleOptionsSpec, _t as KitAlias, a as HealthResult, at as formatGithubReport, b as listOption, bt as Result, c as ScoreResult, ct as classify, d as scoresByCategory, dt as summarize, et as ResolvedHead, f as Rule, g as RuleOptionSpec, gt as Fix, h as isPenalized, i as formatJsonReport, it as formatMarkdownReport, j as overrideMatches, k as compileOverrides, kt as defaultConfig, l as computeHealth, lt as effectiveSeverity, m as docsUrlFor, mt as Config, nt as Runtime, ot as Classification, p as RuleContext, pt as Category, q as stripTextDirective, r as buildJsonReport, rt as withReadLimit, s as ScoreOptions, t as JsonReport, tt as READ_CONCURRENCY, u as computeScore, ut as hasFailureAtOrAbove, v as intOption, w as validateRuleOptions, x as mapOption, y as isMentionedAnywhere, yt as Project, z as BranchStep } from "./json-pC2tDNuR.js";
1
+ import { $ as HeadTag, A as formatFailedRuleWarning, At as defaultProject, B as IDREF_ATTRS, C as shouldSkipRangeCheck, D as applyOverrides, E as CompiledOverride, Et as Severity, F as withFailedRulesOff, Ft as OrphanEffectFact, G as isTopFragment, H as ResolvedA11y, I as KitModuleFacts, It as SourceSpan, J as HeadingInfo, K as splitTokens, L as A11yOccurrenceInfo, Lt as SuppressionDirective, M as selectRules, Mt as ComponentFacts, N as settingOptions, Nt as EachBlockFact, O as applyRuleSeverities, Ot as Value, P as settingSeverity, Pt as EffectFact, Q as HeadProvider, R as A11ySkipCause, Rt as skippedFileWarnings, S as resolveRuleOptions, T as validateRuleSetting, Tt as Scope, U as decodeFragmentId, V as LANDMARK_ROLES, W as foldOccurrences, X as ImageInfo, Y as ResolvedHeadings, Z as ResolvedImages, _ as RuleOptionsSpec, _t as KitAlias, a as HealthResult, at as formatGithubReport, b as listOption, bt as Result, c as ScoreResult, ct as classify, d as scoresByCategory, dt as summarize, et as ResolvedHead, f as Rule, g as RuleOptionSpec, gt as Fix, h as isPenalized, i as formatJsonReport, it as formatMarkdownReport, j as overrideMatches, k as compileOverrides, kt as defaultConfig, l as computeHealth, lt as effectiveSeverity, m as docsUrlFor, mt as Config, nt as Runtime, ot as Classification, p as RuleContext, pt as Category, q as stripTextDirective, r as buildJsonReport, rt as withReadLimit, s as ScoreOptions, t as JsonReport, tt as READ_CONCURRENCY, u as computeScore, ut as hasFailureAtOrAbove, v as intOption, w as validateRuleOptions, x as mapOption, y as isMentionedAnywhere, yt as Project, z as BranchStep } from "./json-CcKHN-tx.js";
2
2
  import { AST } from "svelte/compiler";
3
3
  //#region src/component-parse.d.ts
4
4
  /**
@@ -753,6 +753,9 @@ declare const a11yInvalidAriaValue: Rule;
753
753
  //#region src/rules/a11y/interactive-nesting.d.ts
754
754
  declare const a11yInteractiveNesting: Rule;
755
755
  //#endregion
756
+ //#region src/rules/a11y/aria-hidden-focus.d.ts
757
+ declare const a11yAriaHiddenFocus: Rule;
758
+ //#endregion
756
759
  //#region src/rules/a11y/accessible-name.d.ts
757
760
  declare const a11yAccessibleName: Rule;
758
761
  //#endregion
@@ -1050,7 +1053,11 @@ declare function formatSarifReport(results: Result[], config: Config, meta: {
1050
1053
  //#endregion
1051
1054
  //#region src/reporter/app-shell.d.ts
1052
1055
  type Band = 'good' | 'warn' | 'poor';
1053
- declare const BAND_COLOR: Record<Band, string>;
1056
+ declare const BAND_COLOR: {
1057
+ good: string;
1058
+ warn: string;
1059
+ poor: string;
1060
+ };
1054
1061
  declare function scoreBand(score: number): Band;
1055
1062
  declare function escapeHtml(s: string): string;
1056
1063
  /**
@@ -1112,4 +1119,4 @@ declare function formatHtmlReport(results: Result[], config: Config, meta: {
1112
1119
  coreVersion?: string;
1113
1120
  }): string;
1114
1121
  //#endregion
1115
- export { type A11yOccurrenceInfo, type A11ySkipCause, APP_SCRIPT, APP_STYLE, type AppSnapshot, BAND_COLOR, type BranchStep, CHILD_NODE_KEYS, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadProvider, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, LANDMARK_ROLES, type OrphanEffectFact, type Palette, type Project, READ_CONCURRENCY, ROBOTS_SOURCE_PATHS, type RawKitAliases, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, RuleInfo, RuleOptionInfo, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, VITE_CONFIG_FILES, type ViteKitConfigResult, a11yAbbrTitle, a11yAccessibleName, a11yDeprecatedAria, a11yDeprecatedAttr, a11yDeprecatedElement, a11yDisallowedAriaProps, a11yDisallowedElement, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoAccesskey, a11yNoAutofocus, a11yNoDuplicateDt, a11yNoMissingIdRef, a11yPatternTitle, a11yPermittedContents, a11yPlaceholderLabelOption, a11yPositiveTabindex, a11yRequireDatetime, a11yRequiredAriaProps, a11yRequiredElement, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUnverifiedIdRef, a11yUseList, allRules, applyInlineDirectives, applyOverrides, applyRuleSeverities, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, buildJsonReport, classify, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, collectSuppressions, compileOverrides, computeHealth, computeScore, correctnessAutoplayMuted, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, foldOccurrences, formatAgentReport, formatConsoleReport, formatFailedRuleWarning, formatGithubReport, formatHtmlReport, formatJsonReport, formatMarkdownReport, formatSarifReport, hasFailureAtOrAbove, headTagRule, imageRule, intOption, isMentionedAnywhere, isPenalized, isTopFragment, lineOf, linkRule, listOption, mapOption, noColorPalette, overrideMatches, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceIframeLoading, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRuleOptions, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, scoresByCategory, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, selectRules, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, settingOptions, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, terminalSafe, textFromNodes, unknownDirectiveIds, validateRuleOptions, validateRuleSetting, valueFromNodes, withFailedRulesOff, withReadLimit };
1122
+ export { type A11yOccurrenceInfo, type A11ySkipCause, APP_SCRIPT, APP_STYLE, type AppSnapshot, BAND_COLOR, type BranchStep, CHILD_NODE_KEYS, type Classification, type CompiledOverride, type ComponentFacts, type ConsoleReportOptions, type DirectiveIndex, type EachBlockFact, type EffectFact, type FailedRule, type HeadProvider, type HeadTag, type HeadingInfo, type HealthResult, IDREF_ATTRS, type ImageInfo, type KitAlias, type KitModuleFacts, LANDMARK_ROLES, type OrphanEffectFact, type Palette, type Project, READ_CONCURRENCY, ROBOTS_SOURCE_PATHS, type RawKitAliases, type ResolvedA11y, type ResolvedHead, type ResolvedHeadings, type ResolvedImages, type RouteBadge, type Rule, type RuleContext, RuleInfo, RuleOptionInfo, type RuleOptionSpec, type RuleOptionsSpec, type Runtime, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, type Scope, type ScoreOptions, type ScoreResult, type SourceSpan, type SuppressionDirective, VITE_CONFIG_FILES, type ViteKitConfigResult, a11yAbbrTitle, a11yAccessibleName, a11yAriaHiddenFocus, a11yDeprecatedAria, a11yDeprecatedAttr, a11yDeprecatedElement, a11yDisallowedAriaProps, a11yDisallowedElement, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoAccesskey, a11yNoAutofocus, a11yNoDuplicateDt, a11yNoMissingIdRef, a11yPatternTitle, a11yPermittedContents, a11yPlaceholderLabelOption, a11yPositiveTabindex, a11yRequireDatetime, a11yRequiredAriaProps, a11yRequiredElement, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUnverifiedIdRef, a11yUseList, allRules, applyInlineDirectives, applyOverrides, applyRuleSeverities, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, buildJsonReport, classify, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, collectSuppressions, compileOverrides, computeHealth, computeScore, correctnessAutoplayMuted, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, foldOccurrences, formatAgentReport, formatConsoleReport, formatFailedRuleWarning, formatGithubReport, formatHtmlReport, formatJsonReport, formatMarkdownReport, formatSarifReport, hasFailureAtOrAbove, headTagRule, imageRule, intOption, isMentionedAnywhere, isPenalized, isTopFragment, lineOf, linkRule, listOption, mapOption, noColorPalette, overrideMatches, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceIframeLoading, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRuleOptions, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, scoresByCategory, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, selectRules, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, settingOptions, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, terminalSafe, textFromNodes, unknownDirectiveIds, validateRuleOptions, validateRuleSetting, valueFromNodes, withFailedRulesOff, withReadLimit };
package/dist/internal.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as architectureRouteComponentImport, $n as seoOgTitle, $t as correctnessEachKey, A as a11yAbbrTitle, An as validateRuleSetting, At as textFromNodes, B as a11yInteractiveNesting, Bn as performanceRenderBlockingScript, Bt as correctnessServerBrowserGlobal, C as a11yPermittedContents, Cn as intOption, Ct as attrText, D as a11yDeprecatedAttr, Dn as resolveRuleOptions, Dt as findAttr, E as a11yDisallowedAriaProps, En as mapOption, Et as attrValueOf, F as a11yRequireDatetime, Fn as overrideMatches, Ft as securityServerModuleState, G as performanceIframeLoading, Gn as performanceResponsiveImage, Gt as correctnessCheckableBindValue, H as a11yRequiredAriaProps, Hn as performanceFontPreloadCrossorigin, Ht as correctnessOrphanLifecycle, I as a11yPlaceholderLabelOption, In as selectRules, It as securityHandlerStateWrite, J as performanceLoadWaterfall, Jn as imageRule, Jt as correctnessPropMutation, K as performanceStateRaw, Kn as performanceImageLoadingHint, Kt as correctnessNonreactiveBuiltinState, L as a11yUseList, Ln as settingOptions, Lt as securityJavascriptUrl, M as a11yNoAutofocus, Mn as applyRuleSeverities, Mt as architecturePropCount, N as a11yNoAccesskey, Nn as compileOverrides, Nt as architectureComponentSize, O as a11yDeprecatedElement, On as shouldSkipRangeCheck, Ot as lineOf, P as a11yPositiveTabindex, Pn as formatFailedRuleWarning, Pt as securitySharedStateImport, Q as architectureDocLinkTarget, Qn as seoJsonLd, Qt as correctnessEachIndexKey, R as a11yLabelHasControl, Rn as settingSeverity, Rt as securityRawHtml, S as a11yRequiredElement, Sn as performancePreconnect, St as CHILD_NODE_KEYS, T as a11yDeprecatedAria, Tn as listOption, Tt as attrValue, U as a11yUnknownAriaAttribute, Un as performancePreloadMissingAs, Ut as correctnessOrphanEffect, V as a11yInvalidAriaValue, Vn as performanceLcpImage, Vt as correctnessBasePathNavigation, W as a11yInvalidRole, Wn as linkRule, Wt as correctnessAutoplayMuted, X as performanceNamespaceImport, Xn as seoSitemapXml, Xt as correctnessEffectAsOnMount, Y as performanceMinifyDisabled, Yn as seoHtmlLang, Yt as correctnessUnmutatedState, Z as performanceHeavyImport, Zn as seoRobotsTxt, Zt as correctnessEffectAsDerived, _ as a11yNoMissingIdRef, _n as seoViewport, _t as decodeFragmentId, a as formatJsonReport, an as seoHreflang, ar as classify, at as collectTopLevelBindings, b as a11yDuplicateLandmark, bn as seoTwitterCard, bt as splitTokens, c as scoresByCategory, cn as seoDescriptionLength, cr as summarize, ct as resolveRepoLocalPath, d as messageText, dn as seoJsonLdPlaceholder, dt as collectSuppressions, en as seoSsrDisabled, er as seoOgImage, et as architectureReservedNamePlacement, f as ruleMetaById, fn as seoJsonLdDateFormat, fr as defaultConfig, ft as parseComponentFacts, g as a11yUnverifiedIdRef, gn as seoSitemapInRobots, gt as LANDMARK_ROLES, h as explainRule, hn as seoJsonLdValidity, ht as IDREF_ATTRS, i as buildJsonReport, in as seoSingleH1, ir as seoTitlePresence, it as architecturePrivateScopeImport, j as a11yNoDuplicateDt, jn as applyOverrides, jt as valueFromNodes, k as a11yPatternTitle, kn as validateRuleOptions, kt as parseSvelte, l as formatGithubReport, ln as seoTitleLength, lr as docsUrlFor, lt as resolveRunesModuleSpecifier, m as allRules, mn as seoJsonLdDeprecatedType, mt as unwrapTs, n as mdEscape, nn as seoDuplicateDescription, nr as seoDescriptionPresence, nt as architectureDirectoryNaming, o as computeHealth, on as seoImageAlt, or as effectiveSeverity, ot as parseInMemoryExports, p as severityToSarifLevel, pn as seoJsonLdRelativeUrl, pr as defaultProject, pt as parseModuleProgram, q as performanceSequentialAwaits, qn as performanceImageDimensions, qt as correctnessStalePropDerivation, r as terminalSafe, rn as seoDuplicateTitle, rr as headTagRule, rt as architectureUnitEntryFile, s as computeScore, sn as seoCharset, sr as hasFailureAtOrAbove, st as parseKitModuleFacts, t as formatMarkdownReport, tn as seoHeadingLevelSkip, tr as seoCanonicalUrl, tt as architectureReservedDirectoryNames, u as SEVERITY_RANK, un as seoJsonLdRequiredProps, ur as isPenalized, ut as collectNamedImportAliases, v as a11yIdDuplication, vn as seoOgUrl, vt as foldOccurrences, w as a11yDisallowedElement, wn as isMentionedAnywhere, wt as attrTextOf, x as a11yDoctype, xn as seoIndexability, xt as stripTextDirective, y as a11yTopLevelLandmark, yn as seoOgDescription, yt as isTopFragment, z as a11yAccessibleName, zn as withFailedRulesOff, zt as correctnessInstanceBrowserGlobal } from "./markdown-CP5TPy-s.js";
1
+ import { $ as architectureDocLinkTarget, $n as seoJsonLd, $t as correctnessEachIndexKey, A as a11yAbbrTitle, An as validateRuleOptions, At as parseSvelte, B as a11yAriaHiddenFocus, Bn as withFailedRulesOff, Bt as correctnessInstanceBrowserGlobal, C as a11yPermittedContents, Cn as performancePreconnect, Ct as CHILD_NODE_KEYS, D as a11yDeprecatedAttr, Dn as mapOption, Dt as attrValueOf, E as a11yDisallowedAriaProps, En as listOption, Et as attrValue, F as a11yRequireDatetime, Fn as formatFailedRuleWarning, Ft as securitySharedStateImport, G as a11yInvalidRole, Gn as linkRule, Gt as correctnessAutoplayMuted, H as a11yInvalidAriaValue, Hn as performanceLcpImage, Ht as correctnessBasePathNavigation, I as a11yPlaceholderLabelOption, In as overrideMatches, It as securityServerModuleState, J as performanceSequentialAwaits, Jn as performanceImageDimensions, Jt as correctnessStalePropDerivation, K as performanceIframeLoading, Kn as performanceResponsiveImage, Kt as correctnessCheckableBindValue, L as a11yUseList, Ln as selectRules, Lt as securityHandlerStateWrite, M as a11yNoAutofocus, Mn as applyOverrides, Mt as valueFromNodes, N as a11yNoAccesskey, Nn as applyRuleSeverities, Nt as architecturePropCount, O as a11yDeprecatedElement, On as resolveRuleOptions, Ot as findAttr, P as a11yPositiveTabindex, Pn as compileOverrides, Pt as architectureComponentSize, Q as performanceHeavyImport, Qn as seoRobotsTxt, Qt as correctnessEffectAsDerived, R as a11yLabelHasControl, Rn as settingOptions, Rt as securityJavascriptUrl, S as a11yRequiredElement, Sn as seoIndexability, St as stripTextDirective, T as a11yDeprecatedAria, Tn as isMentionedAnywhere, Tt as attrTextOf, U as a11yRequiredAriaProps, Un as performanceFontPreloadCrossorigin, Ut as correctnessOrphanLifecycle, V as a11yInteractiveNesting, Vn as performanceRenderBlockingScript, Vt as correctnessServerBrowserGlobal, W as a11yUnknownAriaAttribute, Wn as performancePreloadMissingAs, Wt as correctnessOrphanEffect, X as performanceMinifyDisabled, Xn as seoHtmlLang, Xt as correctnessUnmutatedState, Y as performanceLoadWaterfall, Yn as imageRule, Yt as correctnessPropMutation, Z as performanceNamespaceImport, Zn as seoSitemapXml, Zt as correctnessEffectAsOnMount, _ as a11yNoMissingIdRef, _n as seoSitemapInRobots, _t as LANDMARK_ROLES, a as formatJsonReport, an as seoSingleH1, ar as seoTitlePresence, at as architecturePrivateScopeImport, b as a11yDuplicateLandmark, bn as seoOgDescription, bt as isTopFragment, c as scoresByCategory, cn as seoCharset, cr as hasFailureAtOrAbove, ct as parseKitModuleFacts, d as messageText, dn as seoJsonLdRequiredProps, dr as isPenalized, dt as collectNamedImportAliases, en as correctnessEachKey, er as seoOgTitle, et as architectureRouteComponentImport, f as ruleMetaById, fn as seoJsonLdPlaceholder, ft as collectSuppressions, g as a11yUnverifiedIdRef, gn as seoJsonLdValidity, gt as IDREF_ATTRS, h as explainRule, hn as seoJsonLdDeprecatedType, ht as unwrapTs, i as buildJsonReport, in as seoDuplicateTitle, ir as headTagRule, it as architectureUnitEntryFile, j as a11yNoDuplicateDt, jn as validateRuleSetting, jt as textFromNodes, k as a11yPatternTitle, kn as shouldSkipRangeCheck, kt as lineOf, l as formatGithubReport, ln as seoDescriptionLength, lr as summarize, lt as resolveRepoLocalPath, m as allRules, mn as seoJsonLdRelativeUrl, mr as defaultProject, mt as parseModuleProgram, n as mdEscape, nn as seoHeadingLevelSkip, nr as seoCanonicalUrl, nt as architectureReservedDirectoryNames, o as computeHealth, on as seoHreflang, or as classify, ot as collectTopLevelBindings, p as severityToSarifLevel, pn as seoJsonLdDateFormat, pr as defaultConfig, pt as parseComponentFacts, q as performanceStateRaw, qn as performanceImageLoadingHint, qt as correctnessNonreactiveBuiltinState, r as terminalSafe, rn as seoDuplicateDescription, rr as seoDescriptionPresence, rt as architectureDirectoryNaming, s as computeScore, sn as seoImageAlt, sr as effectiveSeverity, st as parseInMemoryExports, t as formatMarkdownReport, tn as seoSsrDisabled, tr as seoOgImage, tt as architectureReservedNamePlacement, u as SEVERITY_RANK, un as seoTitleLength, ur as docsUrlFor, ut as resolveRunesModuleSpecifier, v as a11yIdDuplication, vn as seoViewport, vt as decodeFragmentId, w as a11yDisallowedElement, wn as intOption, wt as attrText, x as a11yDoctype, xn as seoTwitterCard, xt as splitTokens, y as a11yTopLevelLandmark, yn as seoOgUrl, yt as foldOccurrences, z as a11yAccessibleName, zn as settingSeverity, zt as securityRawHtml } from "./markdown-CEYpv4SU.js";
2
2
  //#region src/inline-directives.ts
3
3
  /** The directive silencing `r`, if one sits on its line and names its rule (or names nothing). */
4
4
  function directiveFor(index, r) {
@@ -1707,4 +1707,4 @@ function formatHtmlReport(results, config, meta) {
1707
1707
  return buildHtmlDocument(buildJsonReport(results, config, meta), meta);
1708
1708
  }
1709
1709
  //#endregion
1710
- export { APP_SCRIPT, APP_STYLE, BAND_COLOR, CHILD_NODE_KEYS, IDREF_ATTRS, LANDMARK_ROLES, READ_CONCURRENCY, ROBOTS_SOURCE_PATHS, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, VITE_CONFIG_FILES, a11yAbbrTitle, a11yAccessibleName, a11yDeprecatedAria, a11yDeprecatedAttr, a11yDeprecatedElement, a11yDisallowedAriaProps, a11yDisallowedElement, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoAccesskey, a11yNoAutofocus, a11yNoDuplicateDt, a11yNoMissingIdRef, a11yPatternTitle, a11yPermittedContents, a11yPlaceholderLabelOption, a11yPositiveTabindex, a11yRequireDatetime, a11yRequiredAriaProps, a11yRequiredElement, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUnverifiedIdRef, a11yUseList, allRules, applyInlineDirectives, applyOverrides, applyRuleSeverities, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, buildJsonReport, classify, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, collectSuppressions, compileOverrides, computeHealth, computeScore, correctnessAutoplayMuted, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, foldOccurrences, formatAgentReport, formatConsoleReport, formatFailedRuleWarning, formatGithubReport, formatHtmlReport, formatJsonReport, formatMarkdownReport, formatSarifReport, hasFailureAtOrAbove, headTagRule, imageRule, intOption, isMentionedAnywhere, isPenalized, isTopFragment, lineOf, linkRule, listOption, mapOption, noColorPalette, overrideMatches, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceIframeLoading, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRuleOptions, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, scoresByCategory, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, selectRules, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, settingOptions, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, terminalSafe, textFromNodes, unknownDirectiveIds, validateRuleOptions, validateRuleSetting, valueFromNodes, withFailedRulesOff, withReadLimit };
1710
+ export { APP_SCRIPT, APP_STYLE, BAND_COLOR, CHILD_NODE_KEYS, IDREF_ATTRS, LANDMARK_ROLES, READ_CONCURRENCY, ROBOTS_SOURCE_PATHS, SITEMAP_SOURCE_PATHS, SVELTE_CONFIG_FILES, VITE_CONFIG_FILES, a11yAbbrTitle, a11yAccessibleName, a11yAriaHiddenFocus, a11yDeprecatedAria, a11yDeprecatedAttr, a11yDeprecatedElement, a11yDisallowedAriaProps, a11yDisallowedElement, a11yDoctype, a11yDuplicateLandmark, a11yIdDuplication, a11yInteractiveNesting, a11yInvalidAriaValue, a11yInvalidRole, a11yLabelHasControl, a11yNoAccesskey, a11yNoAutofocus, a11yNoDuplicateDt, a11yNoMissingIdRef, a11yPatternTitle, a11yPermittedContents, a11yPlaceholderLabelOption, a11yPositiveTabindex, a11yRequireDatetime, a11yRequiredAriaProps, a11yRequiredElement, a11yTopLevelLandmark, a11yUnknownAriaAttribute, a11yUnverifiedIdRef, a11yUseList, allRules, applyInlineDirectives, applyOverrides, applyRuleSeverities, architectureComponentSize, architectureDirectoryNaming, architectureDocLinkTarget, architecturePrivateScopeImport, architecturePropCount, architectureReservedDirectoryNames, architectureReservedNamePlacement, architectureRouteComponentImport, architectureUnitEntryFile, attrText, attrTextOf, attrValue, attrValueOf, buildHtmlDocument, buildJsonReport, classify, collectComponentFacts, collectKitModuleFacts, collectSourceFiles, collectSuppressions, compileOverrides, computeHealth, computeScore, correctnessAutoplayMuted, correctnessBasePathNavigation, correctnessCheckableBindValue, correctnessEachIndexKey, correctnessEachKey, correctnessEffectAsDerived, correctnessEffectAsOnMount, correctnessInstanceBrowserGlobal, correctnessNonreactiveBuiltinState, correctnessOrphanEffect, correctnessOrphanLifecycle, correctnessPropMutation, correctnessServerBrowserGlobal, correctnessStalePropDerivation, correctnessUnmutatedState, decodeFragmentId, defaultConfig, defaultProject, docsUrlFor, effectiveSeverity, emptyComponentFacts, emptyKitModuleFacts, escapeHtml, explainRule, findAttr, findKitAliasesInSvelteConfig, findKitPathsBaseInSvelteConfig, findKitPathsBaseInViteConfig, findMinifyDisabled, foldOccurrences, formatAgentReport, formatConsoleReport, formatFailedRuleWarning, formatGithubReport, formatHtmlReport, formatJsonReport, formatMarkdownReport, formatSarifReport, hasFailureAtOrAbove, headTagRule, imageRule, intOption, isMentionedAnywhere, isPenalized, isTopFragment, lineOf, linkRule, listOption, mapOption, noColorPalette, overrideMatches, parseComponentFacts, parseKitModuleFacts, parseSvelte, performanceFontPreloadCrossorigin, performanceHeavyImport, performanceIframeLoading, performanceImageDimensions, performanceImageLoadingHint, performanceLcpImage, performanceLoadWaterfall, performanceMinifyDisabled, performanceNamespaceImport, performancePreconnect, performancePreloadMissingAs, performanceRenderBlockingScript, performanceResponsiveImage, performanceSequentialAwaits, performanceStateRaw, renderAppShell, resolveKitAliases, resolveKitPathsBase, resolveRepoLocalPath, resolveRuleOptions, resolveRunesModuleSpecifier, runRules, safeHref, scoreBand, scoreColor, scoresByCategory, securityHandlerStateWrite, securityJavascriptUrl, securityRawHtml, securityServerModuleState, securitySharedStateImport, selectRules, seoCanonicalUrl, seoCharset, seoDescriptionLength, seoDescriptionPresence, seoDuplicateDescription, seoDuplicateTitle, seoHeadingLevelSkip, seoHreflang, seoHtmlLang, seoImageAlt, seoIndexability, seoJsonLd, seoJsonLdDateFormat, seoJsonLdDeprecatedType, seoJsonLdPlaceholder, seoJsonLdRelativeUrl, seoJsonLdRequiredProps, seoJsonLdValidity, seoOgDescription, seoOgImage, seoOgTitle, seoOgUrl, seoRobotsTxt, seoSingleH1, seoSitemapInRobots, seoSitemapXml, seoSsrDisabled, seoTitleLength, seoTitlePresence, seoTwitterCard, seoViewport, settingOptions, settingSeverity, shouldSkipRangeCheck, skippedFileWarnings, splitTokens, stripTextDirective, summarize, terminalSafe, textFromNodes, unknownDirectiveIds, validateRuleOptions, validateRuleSetting, valueFromNodes, withFailedRulesOff, withReadLimit };
@@ -93,6 +93,16 @@ interface InteractiveNestingFact {
93
93
  /** 1-based source line of the descendant, or 0 if unknown. */
94
94
  line: number;
95
95
  }
96
+ /** A keyboard-focusable element that a literal `aria-hidden="true"` hides from assistive
97
+ * technology — carried on the element itself or on an ancestor (a11y/aria-hidden-focus). */
98
+ interface AriaHiddenFocusFact {
99
+ /** The focusable element's tag. */
100
+ tag: string;
101
+ /** The nearest `aria-hidden="true"` ancestor's tag; absent when the element itself carries it. */
102
+ containerTag?: string;
103
+ /** 1-based source line of the focusable element, or 0 if unknown. */
104
+ line: number;
105
+ }
96
106
  /** A `button`/`a href`/`input type="image"` with no computable accessible name (a11y/accessible-name). */
97
107
  interface UnnamedInteractiveFact {
98
108
  tag: string;
@@ -263,6 +273,8 @@ interface ComponentFacts {
263
273
  elements?: ElementFact[];
264
274
  /** Interactive elements nested inside another interactive container (a11y/interactive-nesting). */
265
275
  interactiveNestings?: InteractiveNestingFact[];
276
+ /** Keyboard-focusable elements hidden by a literal `aria-hidden="true"` (a11y/aria-hidden-focus). */
277
+ ariaHiddenFocusables?: AriaHiddenFocusFact[];
266
278
  /** `button`/`a href`/`input type="image"` elements with no computable accessible name (a11y/accessible-name). */
267
279
  unnamedInteractive?: UnnamedInteractiveFact[];
268
280
  /** `<label>` elements with neither a `for` attribute nor a wrapped labelable descendant (a11y/label-has-control). */
@@ -4464,6 +4464,54 @@ function collectInteractiveNestings(node, source, acc, stack) {
4464
4464
  for (const key of CHILD_NODE_KEYS) if (key in node) collectInteractiveNestings(node[key], source, acc, stack);
4465
4465
  if (opened) stack.pop();
4466
4466
  }
4467
+ /** Tags on which a `disabled` attribute actually removes focusability (it does nothing on `<a>`). */
4468
+ const DISABLEABLE_TAGS = /* @__PURE__ */ new Set([
4469
+ "button",
4470
+ "input",
4471
+ "select",
4472
+ "textarea"
4473
+ ]);
4474
+ /**
4475
+ * Keyboard-focusable elements hidden by a literal `aria-hidden="true"` (a11y/aria-hidden-focus).
4476
+ * Same conventions as `collectInteractiveNestings`: only `RegularElement`, snippet bodies walk
4477
+ * with a fresh stack (they render at their `{@render}` site), and an expression `aria-hidden`
4478
+ * is unknowable — a toggled `aria-hidden={...}` never opens a container. Exempt as not
4479
+ * focusable: a `tabindex` that is negative (the documented remediation) or an expression (it
4480
+ * may resolve to -1), a `disabled` form control, and anything at or under an `inert` or
4481
+ * `hidden` element — an inert subtree leaves the tab order and a hidden one does not render,
4482
+ * so both carry down the walk as `unfocusable`.
4483
+ */
4484
+ function collectAriaHiddenFocusables(node, source, acc, stack, unfocusable = false) {
4485
+ if (Array.isArray(node)) {
4486
+ for (const child of node) collectAriaHiddenFocusables(child, source, acc, stack, unfocusable);
4487
+ return;
4488
+ }
4489
+ if (!node || typeof node !== "object") return;
4490
+ if (node.type === "SnippetBlock") {
4491
+ for (const key of CHILD_NODE_KEYS) if (key in node) collectAriaHiddenFocusables(node[key], source, acc, []);
4492
+ return;
4493
+ }
4494
+ let opened = false;
4495
+ if (node.type === "RegularElement" && Array.isArray(node.attributes)) {
4496
+ const attrs = elementAttrs(node.attributes);
4497
+ if (attrs.some((a) => a.name === "inert" || a.name === "hidden")) unfocusable = true;
4498
+ const hiddenSelf = attrs.find((a) => a.name === "aria-hidden")?.literal?.trim().toLowerCase() === "true";
4499
+ const tabindexAttr = attrs.find((a) => a.name === "tabindex");
4500
+ const tabindex = literalTabindexValue(tabindexAttr?.literal);
4501
+ const tabindexExempts = tabindexAttr !== void 0 && tabindexAttr.literal === void 0;
4502
+ if (!unfocusable && !tabindexExempts && !(tabindex !== void 0 && tabindex < 0) && !(DISABLEABLE_TAGS.has(node.name) && attrs.some((a) => a.name === "disabled")) && isInteractiveElement(node.name, attrs) && (hiddenSelf || stack.length > 0)) acc.push({
4503
+ tag: node.name,
4504
+ ...hiddenSelf ? {} : { containerTag: stack[stack.length - 1] },
4505
+ line: lineOf(source, node.start)
4506
+ });
4507
+ if (hiddenSelf) {
4508
+ stack.push(node.name);
4509
+ opened = true;
4510
+ }
4511
+ }
4512
+ for (const key of CHILD_NODE_KEYS) if (key in node) collectAriaHiddenFocusables(node[key], source, acc, stack, unfocusable);
4513
+ if (opened) stack.pop();
4514
+ }
4467
4515
  /** `aria-label`/`aria-labelledby`/`title` present on this element: a literal non-empty value,
4468
4516
  * or any expression (its rendered value is unknowable, but its *presence* is enough to name
4469
4517
  * the element — a11y/accessible-name treats an expression name source as present). */
@@ -4487,11 +4535,6 @@ function hasNamingAttr(attributes) {
4487
4535
  function isCustomElement(node) {
4488
4536
  return node.type === "RegularElement" && typeof node.name === "string" && node.name.includes("-");
4489
4537
  }
4490
- /** Named/unknowable verdict for a candidate interactive element's descendant subtree
4491
- * (a11y/accessible-name). `named`: a non-whitespace text descendant, or a descendant `img`
4492
- * with a non-empty literal `alt`. `unknowable`: an expression-tag, `Component`, `{@render}`,
4493
- * or `{@html}` anywhere below — content the rule cannot statically resolve, so the element is
4494
- * skipped rather than risk a false positive. */
4495
4538
  function scanAccessibleNameSubtree(node, skip) {
4496
4539
  if (Array.isArray(node)) {
4497
4540
  const acc = {
@@ -4643,10 +4686,6 @@ function isLabelableDescendant(node) {
4643
4686
  if (node.name !== "input") return true;
4644
4687
  return attrText(node.attributes ?? [], "type")?.toLowerCase() !== "hidden";
4645
4688
  }
4646
- /** Wrapped-control/unknowable verdict for a `<label>`'s subtree (a11y/label-has-control).
4647
- * `hasControl`: a descendant labelable element. `unknowable`: an expression-tag, `Component`,
4648
- * `{@render}`, or `{@html}` anywhere below — content the rule cannot statically resolve, so
4649
- * the label is skipped rather than risk a false positive. */
4650
4689
  function scanLabelSubtree(node) {
4651
4690
  if (Array.isArray(node)) {
4652
4691
  const acc = {
@@ -5676,15 +5715,6 @@ function collectBrowserGlobalRefs(program, source, extra) {
5676
5715
  }
5677
5716
  /** A Svelte runes module file — the whole file is one module-scope program (correctness/orphan-effect). */
5678
5717
  const MODULE_FILE_RE = /\.svelte\.(ts|js)$/;
5679
- /**
5680
- * Parse a plain TS/JS module source by wrapping it in a `<script lang="ts">` tag —
5681
- * the Svelte script parser handles TS natively, so no extra parser dependency is
5682
- * needed. Literal "<\/script" occurrences are neutralised with a same-length
5683
- * placeholder first (string contents don't affect fact extraction; offsets are
5684
- * preserved). Returns the ESTree Program and the wrapped source — wrapped line
5685
- * numbers are +1 relative to the input, so callers subtract 1. Shared by the
5686
- * runes-module facts (correctness/orphan-effect) and the Kit-module facts (the security kit-module rules).
5687
- */
5688
5718
  function parseModuleProgram(source, filename) {
5689
5719
  const wrapped = `<script lang="ts">\n${source.replace(/<\/script/gi, "<_script")}\n<\/script>`;
5690
5720
  return {
@@ -5830,6 +5860,8 @@ function parseComponentFacts(source, filename) {
5830
5860
  collectElements(ast.fragment ?? ast, source, elements, ast.options?.namespace === "svg");
5831
5861
  const interactiveNestings = [];
5832
5862
  collectInteractiveNestings(ast.fragment ?? ast, source, interactiveNestings, []);
5863
+ const ariaHiddenFocusables = [];
5864
+ collectAriaHiddenFocusables(ast.fragment ?? ast, source, ariaHiddenFocusables, []);
5833
5865
  const unnamedInteractive = [];
5834
5866
  const labelTargets = {
5835
5867
  ids: /* @__PURE__ */ new Set(),
@@ -6056,6 +6088,7 @@ function parseComponentFacts(source, filename) {
6056
6088
  ariaElements,
6057
6089
  elements,
6058
6090
  interactiveNestings,
6091
+ ariaHiddenFocusables,
6059
6092
  unnamedInteractive,
6060
6093
  unassociatedLabels,
6061
6094
  bulletTexts,
@@ -8511,6 +8544,21 @@ const a11yInteractiveNesting = componentRule({
8511
8544
  }))
8512
8545
  });
8513
8546
  //#endregion
8547
+ //#region src/rules/a11y/aria-hidden-focus.ts
8548
+ const a11yAriaHiddenFocus = componentRule({
8549
+ id: "a11y/aria-hidden-focus",
8550
+ title: "Focusable element hidden by aria-hidden",
8551
+ category: "a11y",
8552
+ label: "aria-hidden keeps focusables out",
8553
+ rationale: "An element inside `aria-hidden=\"true\"` stays keyboard-reachable while assistive technology announces nothing for it — a screen reader user lands on a control that does not exist for them. The author cannot see this defect: `aria-hidden` changes nothing visually, so only assistive-technology users ever encounter it.",
8554
+ recommendation: "Remove `aria-hidden`, or take the element out of the tab order too (`tabindex=\"-1\"`, `disabled`). To hide an inactive region such as a modal backdrop, prefer the `inert` attribute — it removes the subtree from both the accessibility tree and the tab order at once.",
8555
+ applies: (c) => (c.ariaHiddenFocusables ?? []).length > 0,
8556
+ bad: (c) => (c.ariaHiddenFocusables ?? []).map((f) => ({
8557
+ line: f.line,
8558
+ message: f.containerTag ? `<${f.tag}> inside <${f.containerTag} aria-hidden="true"> is still keyboard-focusable` : `<${f.tag} aria-hidden="true"> is still keyboard-focusable`
8559
+ }))
8560
+ });
8561
+ //#endregion
8514
8562
  //#region src/rules/a11y/accessible-name.ts
8515
8563
  const NAMING_ATTRS = /* @__PURE__ */ new Set([
8516
8564
  "title",
@@ -8906,13 +8954,6 @@ const a11yDeprecatedAttr = componentRule({
8906
8954
  });
8907
8955
  //#endregion
8908
8956
  //#region src/rules/a11y/role-candidates.ts
8909
- /**
8910
- * Element-level ARIA facts that override the dataset's, with the reason each is data judgment
8911
- * rather than data (design 2026-08-19-aria-role-table-rules, "the spec wins over the dataset").
8912
- * `<hgroup>` is `generic` + naming-prohibited in the dataset; html-aria (TR and editor's draft) and
8913
- * axe give it `role=group` with no prohibition. Replacing the whole fact closes every arm at once.
8914
- * `<address>` is already `group` in the dataset and only its naming flag is wrong.
8915
- */
8916
8957
  const ELEMENT_FACT_OVERRIDES = {
8917
8958
  hgroup: { implicitRole: "group" },
8918
8959
  address: { implicitRole: "group" }
@@ -9857,6 +9898,7 @@ const allRules = [
9857
9898
  a11yRequiredAriaProps,
9858
9899
  a11yInvalidAriaValue,
9859
9900
  a11yInteractiveNesting,
9901
+ a11yAriaHiddenFocus,
9860
9902
  a11yAccessibleName,
9861
9903
  a11yLabelHasControl,
9862
9904
  a11yUseList,
@@ -10329,4 +10371,4 @@ function formatMarkdownReport(results, config, meta) {
10329
10371
  return lines.join("\n");
10330
10372
  }
10331
10373
  //#endregion
10332
- export { architectureRouteComponentImport as $, seoOgTitle as $n, correctnessEachKey as $t, a11yAbbrTitle as A, validateRuleSetting as An, textFromNodes as At, a11yInteractiveNesting as B, performanceRenderBlockingScript as Bn, correctnessServerBrowserGlobal as Bt, a11yPermittedContents as C, intOption as Cn, attrText as Ct, a11yDeprecatedAttr as D, resolveRuleOptions as Dn, findAttr as Dt, a11yDisallowedAriaProps as E, mapOption as En, attrValueOf as Et, a11yRequireDatetime as F, overrideMatches as Fn, securityServerModuleState as Ft, performanceIframeLoading as G, performanceResponsiveImage as Gn, correctnessCheckableBindValue as Gt, a11yRequiredAriaProps as H, performanceFontPreloadCrossorigin as Hn, correctnessOrphanLifecycle as Ht, a11yPlaceholderLabelOption as I, selectRules as In, securityHandlerStateWrite as It, performanceLoadWaterfall as J, imageRule as Jn, correctnessPropMutation as Jt, performanceStateRaw as K, performanceImageLoadingHint as Kn, correctnessNonreactiveBuiltinState as Kt, a11yUseList as L, settingOptions as Ln, securityJavascriptUrl as Lt, a11yNoAutofocus as M, applyRuleSeverities as Mn, architecturePropCount as Mt, a11yNoAccesskey as N, compileOverrides as Nn, architectureComponentSize as Nt, a11yDeprecatedElement as O, shouldSkipRangeCheck as On, lineOf as Ot, a11yPositiveTabindex as P, formatFailedRuleWarning as Pn, securitySharedStateImport as Pt, architectureDocLinkTarget as Q, seoJsonLd as Qn, correctnessEachIndexKey as Qt, a11yLabelHasControl as R, settingSeverity as Rn, securityRawHtml as Rt, a11yRequiredElement as S, performancePreconnect as Sn, CHILD_NODE_KEYS as St, a11yDeprecatedAria as T, listOption as Tn, attrValue as Tt, a11yUnknownAriaAttribute as U, performancePreloadMissingAs as Un, correctnessOrphanEffect as Ut, a11yInvalidAriaValue as V, performanceLcpImage as Vn, correctnessBasePathNavigation as Vt, a11yInvalidRole as W, linkRule as Wn, correctnessAutoplayMuted as Wt, performanceNamespaceImport as X, seoSitemapXml as Xn, correctnessEffectAsOnMount as Xt, performanceMinifyDisabled as Y, seoHtmlLang as Yn, correctnessUnmutatedState as Yt, performanceHeavyImport as Z, seoRobotsTxt as Zn, correctnessEffectAsDerived as Zt, a11yNoMissingIdRef as _, seoViewport as _n, decodeFragmentId as _t, formatJsonReport as a, seoHreflang as an, classify as ar, collectTopLevelBindings as at, a11yDuplicateLandmark as b, seoTwitterCard as bn, splitTokens as bt, scoresByCategory as c, seoDescriptionLength as cn, summarize as cr, resolveRepoLocalPath as ct, messageText as d, seoJsonLdPlaceholder as dn, CATEGORIES as dr, collectSuppressions as dt, seoSsrDisabled as en, seoOgImage as er, architectureReservedNamePlacement as et, ruleMetaById as f, seoJsonLdDateFormat as fn, defaultConfig as fr, parseComponentFacts as ft, a11yUnverifiedIdRef as g, seoSitemapInRobots as gn, LANDMARK_ROLES as gt, explainRule as h, seoJsonLdValidity as hn, IDREF_ATTRS as ht, buildJsonReport as i, seoSingleH1 as in, seoTitlePresence as ir, architecturePrivateScopeImport as it, a11yNoDuplicateDt as j, applyOverrides as jn, valueFromNodes as jt, a11yPatternTitle as k, validateRuleOptions as kn, parseSvelte as kt, formatGithubReport as l, seoTitleLength as ln, docsUrlFor as lr, resolveRunesModuleSpecifier as lt, allRules as m, seoJsonLdDeprecatedType as mn, defineConfig as mr, unwrapTs as mt, mdEscape as n, seoDuplicateDescription as nn, seoDescriptionPresence as nr, architectureDirectoryNaming as nt, computeHealth as o, seoImageAlt as on, effectiveSeverity as or, parseInMemoryExports as ot, severityToSarifLevel as p, seoJsonLdRelativeUrl as pn, defaultProject as pr, parseModuleProgram as pt, performanceSequentialAwaits as q, performanceImageDimensions as qn, correctnessStalePropDerivation as qt, terminalSafe as r, seoDuplicateTitle as rn, headTagRule as rr, architectureUnitEntryFile as rt, computeScore as s, seoCharset as sn, hasFailureAtOrAbove as sr, parseKitModuleFacts as st, formatMarkdownReport as t, seoHeadingLevelSkip as tn, seoCanonicalUrl as tr, architectureReservedDirectoryNames as tt, SEVERITY_RANK as u, seoJsonLdRequiredProps as un, isPenalized as ur, collectNamedImportAliases as ut, a11yIdDuplication as v, seoOgUrl as vn, foldOccurrences as vt, a11yDisallowedElement as w, isMentionedAnywhere as wn, attrTextOf as wt, a11yDoctype as x, seoIndexability as xn, stripTextDirective as xt, a11yTopLevelLandmark as y, seoOgDescription as yn, isTopFragment as yt, a11yAccessibleName as z, withFailedRulesOff as zn, correctnessInstanceBrowserGlobal as zt };
10374
+ export { architectureDocLinkTarget as $, seoJsonLd as $n, correctnessEachIndexKey as $t, a11yAbbrTitle as A, validateRuleOptions as An, parseSvelte as At, a11yAriaHiddenFocus as B, withFailedRulesOff as Bn, correctnessInstanceBrowserGlobal as Bt, a11yPermittedContents as C, performancePreconnect as Cn, CHILD_NODE_KEYS as Ct, a11yDeprecatedAttr as D, mapOption as Dn, attrValueOf as Dt, a11yDisallowedAriaProps as E, listOption as En, attrValue as Et, a11yRequireDatetime as F, formatFailedRuleWarning as Fn, securitySharedStateImport as Ft, a11yInvalidRole as G, linkRule as Gn, correctnessAutoplayMuted as Gt, a11yInvalidAriaValue as H, performanceLcpImage as Hn, correctnessBasePathNavigation as Ht, a11yPlaceholderLabelOption as I, overrideMatches as In, securityServerModuleState as It, performanceSequentialAwaits as J, performanceImageDimensions as Jn, correctnessStalePropDerivation as Jt, performanceIframeLoading as K, performanceResponsiveImage as Kn, correctnessCheckableBindValue as Kt, a11yUseList as L, selectRules as Ln, securityHandlerStateWrite as Lt, a11yNoAutofocus as M, applyOverrides as Mn, valueFromNodes as Mt, a11yNoAccesskey as N, applyRuleSeverities as Nn, architecturePropCount as Nt, a11yDeprecatedElement as O, resolveRuleOptions as On, findAttr as Ot, a11yPositiveTabindex as P, compileOverrides as Pn, architectureComponentSize as Pt, performanceHeavyImport as Q, seoRobotsTxt as Qn, correctnessEffectAsDerived as Qt, a11yLabelHasControl as R, settingOptions as Rn, securityJavascriptUrl as Rt, a11yRequiredElement as S, seoIndexability as Sn, stripTextDirective as St, a11yDeprecatedAria as T, isMentionedAnywhere as Tn, attrTextOf as Tt, a11yRequiredAriaProps as U, performanceFontPreloadCrossorigin as Un, correctnessOrphanLifecycle as Ut, a11yInteractiveNesting as V, performanceRenderBlockingScript as Vn, correctnessServerBrowserGlobal as Vt, a11yUnknownAriaAttribute as W, performancePreloadMissingAs as Wn, correctnessOrphanEffect as Wt, performanceMinifyDisabled as X, seoHtmlLang as Xn, correctnessUnmutatedState as Xt, performanceLoadWaterfall as Y, imageRule as Yn, correctnessPropMutation as Yt, performanceNamespaceImport as Z, seoSitemapXml as Zn, correctnessEffectAsOnMount as Zt, a11yNoMissingIdRef as _, seoSitemapInRobots as _n, LANDMARK_ROLES as _t, formatJsonReport as a, seoSingleH1 as an, seoTitlePresence as ar, architecturePrivateScopeImport as at, a11yDuplicateLandmark as b, seoOgDescription as bn, isTopFragment as bt, scoresByCategory as c, seoCharset as cn, hasFailureAtOrAbove as cr, parseKitModuleFacts as ct, messageText as d, seoJsonLdRequiredProps as dn, isPenalized as dr, collectNamedImportAliases as dt, correctnessEachKey as en, seoOgTitle as er, architectureRouteComponentImport as et, ruleMetaById as f, seoJsonLdPlaceholder as fn, CATEGORIES as fr, collectSuppressions as ft, a11yUnverifiedIdRef as g, seoJsonLdValidity as gn, IDREF_ATTRS as gt, explainRule as h, seoJsonLdDeprecatedType as hn, defineConfig as hr, unwrapTs as ht, buildJsonReport as i, seoDuplicateTitle as in, headTagRule as ir, architectureUnitEntryFile as it, a11yNoDuplicateDt as j, validateRuleSetting as jn, textFromNodes as jt, a11yPatternTitle as k, shouldSkipRangeCheck as kn, lineOf as kt, formatGithubReport as l, seoDescriptionLength as ln, summarize as lr, resolveRepoLocalPath as lt, allRules as m, seoJsonLdRelativeUrl as mn, defaultProject as mr, parseModuleProgram as mt, mdEscape as n, seoHeadingLevelSkip as nn, seoCanonicalUrl as nr, architectureReservedDirectoryNames as nt, computeHealth as o, seoHreflang as on, classify as or, collectTopLevelBindings as ot, severityToSarifLevel as p, seoJsonLdDateFormat as pn, defaultConfig as pr, parseComponentFacts as pt, performanceStateRaw as q, performanceImageLoadingHint as qn, correctnessNonreactiveBuiltinState as qt, terminalSafe as r, seoDuplicateDescription as rn, seoDescriptionPresence as rr, architectureDirectoryNaming as rt, computeScore as s, seoImageAlt as sn, effectiveSeverity as sr, parseInMemoryExports as st, formatMarkdownReport as t, seoSsrDisabled as tn, seoOgImage as tr, architectureReservedNamePlacement as tt, SEVERITY_RANK as u, seoTitleLength as un, docsUrlFor as ur, resolveRunesModuleSpecifier as ut, a11yIdDuplication as v, seoViewport as vn, decodeFragmentId as vt, a11yDisallowedElement as w, intOption as wn, attrText as wt, a11yDoctype as x, seoTwitterCard as xn, splitTokens as xt, a11yTopLevelLandmark as y, seoOgUrl as yn, foldOccurrences as yt, a11yAccessibleName as z, settingSeverity as zn, securityRawHtml as zt };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@svelte-vitals/core",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
4
4
  "description": "Shared, runtime-agnostic core for svelte-vitals (types, rule engine, scorer, reporter).",
5
5
  "type": "module",
6
6
  "license": "MIT",