mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-15 18:31:06 +00:00
Fixes (#575)
* fix(context-menu): only prevent default keydown behavior if menu is open * docs(notification): update copy * docs(select): update item groups example to use hidden default option * docs: increase max-height to render UIShell, UnorderedList items * fix(ui-shell): remove iconDescription prop from HeaderNavMenu #566 Fixes #566
This commit is contained in:
parent
121062a80c
commit
63e7965745
9 changed files with 41 additions and 63 deletions
|
@ -112,7 +112,8 @@
|
|||
}
|
||||
}}"
|
||||
on:keydown
|
||||
on:keydown|preventDefault="{(e) => {
|
||||
on:keydown="{(e) => {
|
||||
if (open) e.preventDefault();
|
||||
if ($hasPopup) return;
|
||||
|
||||
if (e.key === 'ArrowDown') {
|
||||
|
|
|
@ -14,9 +14,6 @@
|
|||
/** Obtain a reference to the HTML anchor element */
|
||||
export let ref = null;
|
||||
|
||||
/** Specify the ARIA label for the chevron icon */
|
||||
export let iconDescription = "Expand/Collapse";
|
||||
|
||||
import ChevronDown16 from "carbon-icons-svelte/lib/ChevronDown16";
|
||||
</script>
|
||||
|
||||
|
@ -32,7 +29,7 @@
|
|||
}}"
|
||||
/>
|
||||
|
||||
<li class:bx--header__submenu="{true}" title="{iconDescription}">
|
||||
<li class:bx--header__submenu="{true}">
|
||||
<a
|
||||
bind:this="{ref}"
|
||||
role="menuitem"
|
||||
|
@ -59,10 +56,7 @@
|
|||
on:blur
|
||||
>
|
||||
{text}
|
||||
<ChevronDown16
|
||||
aria-label="{iconDescription}"
|
||||
class="bx--header__menu-arrow"
|
||||
/>
|
||||
<ChevronDown16 class="bx--header__menu-arrow" />
|
||||
</a>
|
||||
<ul role="menu" aria-label="{text}" class:bx--header__menu="{true}">
|
||||
<slot />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue