mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 10:51:06 +00:00
fix(ui-shell): fix HeaderNavMenu
accessibility, undefined context (#1079)
Fixes: * hotfix: remove toggle accessor from HeaderNavMenu * hotfix(ui-shell): HeaderNavMenu context is possibly undefined * fix: apply a11y navigation menubar attributes
This commit is contained in:
parent
5103e13321
commit
1939e4328d
3 changed files with 22 additions and 12 deletions
|
@ -14,10 +14,6 @@
|
|||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
export function toggle() {
|
||||
expanded = !expanded;
|
||||
}
|
||||
|
||||
import { setContext } from "svelte";
|
||||
import { writable } from "svelte/store";
|
||||
import ChevronDown16 from "../../icons/ChevronDown16.svelte";
|
||||
|
@ -52,6 +48,7 @@
|
|||
/>
|
||||
|
||||
<li
|
||||
role="none"
|
||||
class:bx--header__submenu="{true}"
|
||||
class:bx--header__submenu--current="{isCurrentSubmenu}"
|
||||
on:click="{(e) => {
|
||||
|
@ -69,6 +66,7 @@
|
|||
>
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
role="menuitem"
|
||||
tabindex="0"
|
||||
aria-haspopup="menu"
|
||||
aria-expanded="{expanded}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue