mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 12:49:20 +00:00
fix(ui-shell): apply a11y navigation menubar attributes
Ref: https://github.com/carbon-design-system/carbon-components-svelte/pull/1073#issuecomment-1035061334
This commit is contained in:
parent
4dae650f76
commit
995a47450f
3 changed files with 4 additions and 2 deletions
|
@ -13,7 +13,7 @@
|
|||
</script>
|
||||
|
||||
<nav {...props} class:bx--header__nav="{true}" {...$$restProps}>
|
||||
<ul {...props} class:bx--header__menu-bar="{true}">
|
||||
<ul {...props} role="menubar" class:bx--header__menu-bar="{true}">
|
||||
<slot />
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
$: updateSelectedItems({ id, isSelected });
|
||||
</script>
|
||||
|
||||
<li>
|
||||
<li role="none">
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
role="menuitem"
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
/>
|
||||
|
||||
<li
|
||||
role="none"
|
||||
class:bx--header__submenu="{true}"
|
||||
class:bx--header__submenu--current="{isCurrentSubmenu}"
|
||||
on:click="{(e) => {
|
||||
|
@ -65,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