Fix some minor bugs

The tabindex variable is of a number type (it should be fixed in all components?)
Add href to link  attributes to get rid of   "<!-- svelte-ignore a11y-missing-attribute -->"
This commit is contained in:
Bilux 2021-11-14 21:03:47 +01:00 committed by GitHub
commit 2c79f16371
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,7 +44,7 @@
$: primaryFocus = $focusedId === id; $: primaryFocus = $focusedId === id;
$: buttonProps = { $: buttonProps = {
role: "menuitem", role: "menuitem",
tabindex: "-1", tabindex: -1,
class: "bx--overflow-menu-options__btn", class: "bx--overflow-menu-options__btn",
disabled: href ? undefined : disabled, disabled: href ? undefined : disabled,
href: href ? href : undefined, href: href ? href : undefined,
@ -62,9 +62,9 @@
{...$$restProps} {...$$restProps}
> >
{#if href} {#if href}
<!-- svelte-ignore a11y-missing-attribute -->
<a <a
bind:this="{ref}" bind:this="{ref}"
{href}
{...buttonProps} {...buttonProps}
on:click on:click
on:click="{() => { on:click="{() => {