Skip to content

Commit

Permalink
Fix active item on focus
Browse files Browse the repository at this point in the history
and refactor tests for listbox
  • Loading branch information
gossi committed Aug 5, 2024
1 parent c4362f5 commit 9026e99
Show file tree
Hide file tree
Showing 28 changed files with 1,026 additions and 884 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ export class ActiveDescendentStrategy implements NavigationPattern, FocusStrateg
}

handleFocus() {
const multiSelection =
this.control.capabilities.multiSelection && this.control.options.multiple;
// const multiSelection =
// this.control.capabilities.multiSelection && this.control.options.multiple;
const selectionPresent = this.control.selection.length > 0;

if (multiSelection && selectionPresent) {
if (selectionPresent) {
this.activateItem(this.control.selection[0]);
} else {
this.activateItem(this.control.items[0]);
Expand Down
272 changes: 0 additions & 272 deletions packages/aria-voyager/tests/listbox/multi-selection.test.ts

This file was deleted.

Loading

0 comments on commit 9026e99

Please # to comment.