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:
parent
6923b2e99b
commit
8b462fd7da
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user