fix(ui-shell): replace javascript:void(0) in HeaderNavMenu

Resolves an a11y "X is not a valid attribute" warning.

#184
This commit is contained in:
Eric Liu 2020-05-26 19:14:03 -07:00
commit ba7cb10aa3

View file

@ -2,6 +2,8 @@
export let text = undefined;
export let iconDescription = 'Expand/Collapse';
export let expanded = false;
export let href = '/';
import ChevronDown16 from 'carbon-icons-svelte/lib/ChevronDown16';
import { cx } from '../../../lib';
@ -31,14 +33,14 @@
role="menuitem"
tabindex="0"
aria-label={text}
href="javascript:void(0)"
{href}
on:keydown
on:keydown={({ key }) => {
if (key === 'Enter') {
expanded = !expanded;
}
}}
on:click
on:click|preventDefault
on:mouseover
on:mouseenter
on:mouseleave