fix: silence autofocus a11y warning inside <dialog>
Ally warning "Avoid using autofocus" appears on <dialog autofocus>
element definition.
But using of autofocus on dialog or its descendants is recommended by the standard: https://html.spec.whatwg.org/multipage/interactive-elements.html#the-dialog-element
As such, authors should use the autofocus attribute on the descendant element of the dialog that the user is expected to immediately interact with after the dialog opens. If there is no such element, then authors should use the autofocus attribute on the dialog element itself.
<dialog autofocus>
I'm a dialog
</dialog>
https://svelte.dev/repl/483135a2842e4da6ba6f24ea63430cf2?version=4.2.0
No response
N/A
annoyance
closes #9225
feat:
, fix:
, chore:
, or docs:
.packages/svelte/src
, add a changeset (npx changeset
).pnpm test
and lint the project with pnpm lint
Latest commit: c02e9a5
The changes in this PR will be included in the next version bump.
Name | Type |
---|---|
svelte | Patch |
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
pnpm add https://pkg.pr.new/svelte@16341
thank you!