Skip to content

Commit

Permalink
aria1.0 combobox with autocomplete=both example: Make Up Arrow set ac…
Browse files Browse the repository at this point in the history
…tivedescendant to last match in list (pull w3c#857)

To address issue w3c#821, make the up arrow behavior when a match exists consistent with when text box is empty.
  • Loading branch information
jongund authored and mcking65 committed Sep 13, 2018
1 parent c301653 commit 18eacf8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/combobox/aria1.0pattern/js/combobox-1.0-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ ComboboxList.prototype.handleKeydown = function (event) {
break;

case this.keyCode.UP:

if (this.listbox.hasOptions()) {
if (this.listbox.hasFocus || (this.isBoth && this.option)) {
this.setOption(this.listbox.getPreviousItem(this.option), true);
Expand All @@ -186,8 +187,8 @@ ComboboxList.prototype.handleKeydown = function (event) {
if (!altKey) {
this.setOption(this.listbox.getLastItem(), true);
}
this.setVisualFocusListbox();
}
this.setVisualFocusListbox();
}
flag = true;
break;
Expand Down

0 comments on commit 18eacf8

Please sign in to comment.