* 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:
Eric Liu 2021-03-20 16:28:29 -07:00 committed by GitHub
commit 63e7965745
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 41 additions and 63 deletions

View file

@ -112,7 +112,8 @@
}
}}"
on:keydown
on:keydown|preventDefault="{(e) => {
on:keydown="{(e) => {
if (open) e.preventDefault();
if ($hasPopup) return;
if (e.key === 'ArrowDown') {

View file

@ -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 />