Repository navigation
fix: recognise aria-braillelabel and aria-brailleroledescription as known ARIA attributes - #18765
Conversation
…as known ARIA attributes
|
Install the latest version of pnpm add https://pkg.svelte.dev/svelte/c/7aedc2ace3087f39fc1125806d218969e920f75fOpen in Note This PR is from a fork. A maintainer must approve approve each commit before it can be built and installed. |
🦋 Changeset detectedLatest commit: 7aedc2a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe compiler now recognises Merge Risk: ⚪ Minimal · up to This change recognizes two valid Braille ARIA attributes and adds validator coverage for them. No current merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## svelte@5.57.1 ### Patch Changes - fix: cancel deferred event listeners during cleanup ([#18749](#18749)) - fix: preserve global CSS in components without scopable elements ([#18793](#18793)) - fix: reduce SSR render result garbage collection ([#18798](#18798)) - fix: resolve the fallback of an each block in the enclosing scope ([#18803](#18803)) - perf: speed up parser interactions with Acorn or avoid them where possible ([#18740](#18740)) - fix: prevent effect tree of batches from interfering with each other ([#18508](#18508)) - fix: serialize input default values during server rendering ([#18733](#18733)) - fix: remove `WAS_MARKED` flag in favor of `Set` ([#18127](#18127)) - fix: throw `set_context_after_init` when `setContext` is called after an `await` during SSR ([#18739](#18739)) - fix: make Object.hasOwn reactive for state proxy ownership changes ([#18838](#18838)) - fix: keep `$state.eager` when used as a variable initializer ([#18809](#18809)) - perf: avoid regex matching in parser where possible ([#18736](#18736)) - fix: in non-async mode, only push variable to current_sources when active_reaction is updating ([#18550](#18550)) - fix: recognise `aria-braillelabel` and `aria-brailleroledescription` as known ARIA attributes ([#18765](#18765)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR contains the following updates: | Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) | |---|---|---|---| | [svelte](https://svelte.dev) ([source](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte)) | [`5.57.0` → `5.57.1`](https://renovatebot.com/diffs/npm/svelte/5.57.0/5.57.1) |  |  | --- ### Release Notes <details> <summary>sveltejs/svelte (svelte)</summary> ### [`v5.57.1`](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5571) [Compare Source](https://github.com/sveltejs/svelte/compare/svelte@5.57.0...svelte@5.57.1) ##### Patch Changes - fix: cancel deferred event listeners during cleanup ([#​18749](sveltejs/svelte#18749)) - fix: preserve global CSS in components without scopable elements ([#​18793](sveltejs/svelte#18793)) - fix: reduce SSR render result garbage collection ([#​18798](sveltejs/svelte#18798)) - fix: resolve the fallback of an each block in the enclosing scope ([#​18803](sveltejs/svelte#18803)) - perf: speed up parser interactions with Acorn or avoid them where possible ([#​18740](sveltejs/svelte#18740)) - fix: prevent effect tree of batches from interfering with each other ([#​18508](sveltejs/svelte#18508)) - fix: serialize input default values during server rendering ([#​18733](sveltejs/svelte#18733)) - fix: remove `WAS_MARKED` flag in favor of `Set` ([#​18127](sveltejs/svelte#18127)) - fix: throw `set_context_after_init` when `setContext` is called after an `await` during SSR ([#​18739](sveltejs/svelte#18739)) - fix: make Object.hasOwn reactive for state proxy ownership changes ([#​18838](sveltejs/svelte#18838)) - fix: keep `$state.eager` when used as a variable initializer ([#​18809](sveltejs/svelte#18809)) - perf: avoid regex matching in parser where possible ([#​18736](sveltejs/svelte#18736)) - fix: in non-async mode, only push variable to current\_sources when active\_reaction is updating ([#​18550](sveltejs/svelte#18550)) - fix: recognise `aria-braillelabel` and `aria-brailleroledescription` as known ARIA attributes ([#​18765](sveltejs/svelte#18765)) </details> --- ### Configuration 📅 **Schedule**: (UTC) - Branch creation - At any time (no schedule defined) - Automerge - At any time (no schedule defined) 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMDQuMiIsInVwZGF0ZWRJblZlciI6IjQ0LjEwOS4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
##### [v5.57.1](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5571) ##### Patch Changes - fix: cancel deferred event listeners during cleanup ([#18749](sveltejs/svelte#18749)) - fix: preserve global CSS in components without scopable elements ([#18793](sveltejs/svelte#18793)) - fix: reduce SSR render result garbage collection ([#18798](sveltejs/svelte#18798)) - fix: resolve the fallback of an each block in the enclosing scope ([#18803](sveltejs/svelte#18803)) - perf: speed up parser interactions with Acorn or avoid them where possible ([#18740](sveltejs/svelte#18740)) - fix: prevent effect tree of batches from interfering with each other ([#18508](sveltejs/svelte#18508)) - fix: serialize input default values during server rendering ([#18733](sveltejs/svelte#18733)) - fix: remove `WAS_MARKED` flag in favor of `Set` ([#18127](sveltejs/svelte#18127)) - fix: throw `set_context_after_init` when `setContext` is called after an `await` during SSR ([#18739](sveltejs/svelte#18739)) - fix: make Object.hasOwn reactive for state proxy ownership changes ([#18838](sveltejs/svelte#18838)) - fix: keep `$state.eager` when used as a variable initializer ([#18809](sveltejs/svelte#18809)) - perf: avoid regex matching in parser where possible ([#18736](sveltejs/svelte#18736)) - fix: in non-async mode, only push variable to current\_sources when active\_reaction is updating ([#18550](sveltejs/svelte#18550)) - fix: recognise `aria-braillelabel` and `aria-brailleroledescription` as known ARIA attributes ([#18765](sveltejs/svelte#18765))
##### [v5.57.1](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5571) ##### Patch Changes - fix: cancel deferred event listeners during cleanup ([#18749](sveltejs/svelte#18749)) - fix: preserve global CSS in components without scopable elements ([#18793](sveltejs/svelte#18793)) - fix: reduce SSR render result garbage collection ([#18798](sveltejs/svelte#18798)) - fix: resolve the fallback of an each block in the enclosing scope ([#18803](sveltejs/svelte#18803)) - perf: speed up parser interactions with Acorn or avoid them where possible ([#18740](sveltejs/svelte#18740)) - fix: prevent effect tree of batches from interfering with each other ([#18508](sveltejs/svelte#18508)) - fix: serialize input default values during server rendering ([#18733](sveltejs/svelte#18733)) - fix: remove `WAS_MARKED` flag in favor of `Set` ([#18127](sveltejs/svelte#18127)) - fix: throw `set_context_after_init` when `setContext` is called after an `await` during SSR ([#18739](sveltejs/svelte#18739)) - fix: make Object.hasOwn reactive for state proxy ownership changes ([#18838](sveltejs/svelte#18838)) - fix: keep `$state.eager` when used as a variable initializer ([#18809](sveltejs/svelte#18809)) - perf: avoid regex matching in parser where possible ([#18736](sveltejs/svelte#18736)) - fix: in non-async mode, only push variable to current\_sources when active\_reaction is updating ([#18550](sveltejs/svelte#18550)) - fix: recognise `aria-braillelabel` and `aria-brailleroledescription` as known ARIA attributes ([#18765](sveltejs/svelte#18765))
##### [v5.57.1](https://github.com/sveltejs/svelte/blob/HEAD/packages/svelte/CHANGELOG.md#5571) ##### Patch Changes - fix: cancel deferred event listeners during cleanup ([#18749](sveltejs/svelte#18749)) - fix: preserve global CSS in components without scopable elements ([#18793](sveltejs/svelte#18793)) - fix: reduce SSR render result garbage collection ([#18798](sveltejs/svelte#18798)) - fix: resolve the fallback of an each block in the enclosing scope ([#18803](sveltejs/svelte#18803)) - perf: speed up parser interactions with Acorn or avoid them where possible ([#18740](sveltejs/svelte#18740)) - fix: prevent effect tree of batches from interfering with each other ([#18508](sveltejs/svelte#18508)) - fix: serialize input default values during server rendering ([#18733](sveltejs/svelte#18733)) - fix: remove `WAS_MARKED` flag in favor of `Set` ([#18127](sveltejs/svelte#18127)) - fix: throw `set_context_after_init` when `setContext` is called after an `await` during SSR ([#18739](sveltejs/svelte#18739)) - fix: make Object.hasOwn reactive for state proxy ownership changes ([#18838](sveltejs/svelte#18838)) - fix: keep `$state.eager` when used as a variable initializer ([#18809](sveltejs/svelte#18809)) - perf: avoid regex matching in parser where possible ([#18736](sveltejs/svelte#18736)) - fix: in non-async mode, only push variable to current\_sources when active\_reaction is updating ([#18550](sveltejs/svelte#18550)) - fix: recognise `aria-braillelabel` and `aria-brailleroledescription` as known ARIA attributes ([#18765](sveltejs/svelte#18765))
Before submitting the PR, please make sure you do the following
feat:,fix:,chore:, ordocs:.packages/svelte/src, add a changeset (npx changeset).Tests and linting
pnpm testand lint the project withpnpm lintWhat breaks
aria-braillelabelandaria-brailleroledescriptionare valid ARIA attributes, but the compiler reports them as unknown:The only workaround is
<!-- svelte-ignore a11y_unknown_aria_attribute -->, which also suppresses genuine typos on the same element.Where
The known ARIA attribute names are hand maintained as a space separated string in
packages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/constants.js:6, and the warning is raised inpackages/svelte/src/compiler/phases/2-analyze/visitors/shared/a11y/index.js:120:The normative rule
Both attributes are defined in Accessible Rich Internet Applications (WAI-ARIA) 1.3, W3C Working Draft 04 June 2026, section 6.8 "Definitions of States and Properties (all aria-* attributes)".
aria-braillelabel(property):aria-brailleroledescription(property):Both are also documented on MDN (aria-braillelabel, aria-brailleroledescription) and shipped in browsers.
Why the current code contradicts it
The list is a strict subset of the ARIA 1.3 state and property set: these two names are the only ones missing, so the compiler calls a spec defined attribute "unknown".
Two further points that make this a plain omission rather than a deliberate exclusion:
The same function already disagrees with itself. A few lines below the unknown attribute check,
a11y/index.jsvalidates the attribute value againstariafromaria-query, andaria-query@5.3.1does define both attributes:So Svelte type checks the value of
aria-braillelabelcorrectly while simultaneously warning that the attribute does not exist. Diffing the two sources:The list already targets ARIA 1.3.
descriptionis in the list and, like the braille attributes, does not exist in WAI-ARIA 1.2; it was added by [fix] Adds aria-description to aria_attributes - #7301 #7302 for exactly this reason. This PR is the same fix for the two attributes that were introduced alongside it.How I proved it
Extended the existing
a11y-aria-propsvalidator sample, which is the fixture that covers this warning:warnings.jsonis unchanged, so the sample now asserts that the two braille attributes produce no warning while the neighbouring typo still does.Counterfactual, with only the source change reverted and the test left in place:
With the fix restored the sample passes again.
Full checks on this branch:
pnpm test:Test Files 34 passed (34),Tests 7769 passed | 55 skipped (7824)pnpm checkinpackages/svelte: cleanpnpm lint(eslint +prettier --check .): clean