diff --git a/content/patterns/listbox/examples/js/listbox-collapsible.js b/content/patterns/listbox/examples/js/listbox-collapsible.js index 4beaae9f5c..4002d17a45 100644 --- a/content/patterns/listbox/examples/js/listbox-collapsible.js +++ b/content/patterns/listbox/examples/js/listbox-collapsible.js @@ -53,7 +53,6 @@ class ListboxButton { case 'ArrowDown': evt.preventDefault(); this.showListbox(); - this.listbox.checkKeyPress(evt); break; } } diff --git a/content/patterns/listbox/examples/js/listbox.js b/content/patterns/listbox/examples/js/listbox.js index 632063f25c..6475933057 100644 --- a/content/patterns/listbox/examples/js/listbox.js +++ b/content/patterns/listbox/examples/js/listbox.js @@ -59,6 +59,8 @@ aria.Listbox = class Listbox { if (this.activeDescendant) { const listitem = document.getElementById(this.activeDescendant); listitem.scrollIntoView({ block: 'nearest', inline: 'nearest' }); + } else { + this.focusFirstItem(); } } diff --git a/content/patterns/listbox/examples/listbox-collapsible.html b/content/patterns/listbox/examples/listbox-collapsible.html index 5fa5958390..8a8a726db5 100644 --- a/content/patterns/listbox/examples/listbox-collapsible.html +++ b/content/patterns/listbox/examples/listbox-collapsible.html @@ -66,6 +66,7 @@

Example