Fix a11y-noninteractive-element-interactions (#2578)

* Fix a11y-noninteractive-element-interactions

* Update CONTRIBUTORS

* Fix formatting issues

* Address a11y-noninteractive-element-interactions
This commit is contained in:
Derek Dang 2023-07-16 21:34:09 -07:00 committed by GitHub
parent 754fcc2b3a
commit ca41dfeb3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 10 deletions

View file

@ -129,6 +129,7 @@ Ben Yip <github.com/bennyyip>
mmjang <752515918@qq.com>
shunlog <github.com/shunlog>
3ter <github.com/3ter>
Derek Dang <https://github.com/derekdang/>
********************

View file

@ -230,7 +230,6 @@ impl BuildAction for SvelteCheck {
"a11y-click-events-have-key-events",
"a11y-no-noninteractive-tabindex",
"a11y-no-static-element-interactions",
"a11y-no-noninteractive-element-interactions",
]
.iter()
.map(|warning| format!("{}$:ignore", warning))

View file

@ -94,15 +94,16 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<div id="nav">
<ul>
{#each helpSections as section, i}
<li
<li>
<button
on:click={() => {
activeIndex = i;
carousel.to(activeIndex);
}}
class:active={i == activeIndex}
>
<span class:active={i == activeIndex}>
{section.title}
</span>
</button>
</li>
{/each}
</ul>
@ -171,10 +172,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
padding: 0;
}
li span {
li button {
display: block;
padding: 0.5rem 0.75rem;
text-decoration: none;
text-align: left;
min-width: 250px;
background-color: var(--canvas);
border: none;
cursor: pointer;
&:hover {
background-color: var(--canvas-inset);

View file

@ -18,6 +18,8 @@
});
</script>
<!-- svelte-ignore a11y-no-noninteractive-element-interactions -->
<!-- svelte-ignore a11y-click-events-have-key-events -->
<label
bind:this={spanRef}
for={forId}