mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-21 20:59: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>
|
</script>
|
||||||
|
|
||||||
<nav {...props} class:bx--header__nav="{true}" {...$$restProps}>
|
<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 />
|
<slot />
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
$: updateSelectedItems({ id, isSelected });
|
$: updateSelectedItems({ id, isSelected });
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<li>
|
<li role="none">
|
||||||
<a
|
<a
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
role="menuitem"
|
role="menuitem"
|
||||||
|
|
|
@ -48,6 +48,7 @@
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<li
|
<li
|
||||||
|
role="none"
|
||||||
class:bx--header__submenu="{true}"
|
class:bx--header__submenu="{true}"
|
||||||
class:bx--header__submenu--current="{isCurrentSubmenu}"
|
class:bx--header__submenu--current="{isCurrentSubmenu}"
|
||||||
on:click="{(e) => {
|
on:click="{(e) => {
|
||||||
|
@ -65,6 +66,7 @@
|
||||||
>
|
>
|
||||||
<a
|
<a
|
||||||
bind:this="{ref}"
|
bind:this="{ref}"
|
||||||
|
role="menuitem"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
aria-haspopup="menu"
|
aria-haspopup="menu"
|
||||||
aria-expanded="{expanded}"
|
aria-expanded="{expanded}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue