0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-11-29 16:36:44 +01:00

[docs] Fix 3.52.0 a11y warning in svelte-self tutorial (#7988)

* fix svelte 3.52 a11y warning

* replace span with button and drop on:keyup
This commit is contained in:
Janosh Riebesell 2022-12-03 06:55:51 -08:00 committed by GitHub
parent 6923b2e99b
commit 8b462fd7da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -10,7 +10,7 @@
}
</script>
<span class:expanded on:click={toggle}>{name}</span>
<button class:expanded on:click={toggle}>{name}</button>
{#if expanded}
<ul>
@ -27,12 +27,14 @@
{/if}
<style>
span {
button {
padding: 0 0 0 1.5em;
background: url(/tutorial/icons/folder.svg) 0 0.1em no-repeat;
background-size: 1em 1em;
font-weight: bold;
cursor: pointer;
border: none;
margin: 0;
}
.expanded {

View File

@ -10,7 +10,7 @@
}
</script>
<span class:expanded on:click={toggle}>{name}</span>
<button class:expanded on:click={toggle}>{name}</button>
{#if expanded}
<ul>
@ -27,12 +27,14 @@
{/if}
<style>
span {
button {
padding: 0 0 0 1.5em;
background: url(/tutorial/icons/folder.svg) 0 0.1em no-repeat;
background-size: 1em 1em;
font-weight: bold;
cursor: pointer;
border: none;
margin: 0;
}
.expanded {