MDL-68167 lib: Do not set aria-expanded if it should not be set
This commit is contained in:
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -336,8 +336,12 @@ function($, log, str, templates, notification, LoadingIcon, Aria) {
|
||||
var inputElement = $(document.getElementById(state.inputId));
|
||||
var suggestionsElement = $(document.getElementById(state.suggestionsId));
|
||||
|
||||
// Announce the list of suggestions was closed, and read the current list of selections.
|
||||
inputElement.attr('aria-expanded', false).attr('aria-activedescendant', state.selectionId);
|
||||
if (inputElement.attr('aria-expanded') === "true") {
|
||||
// Announce the list of suggestions was closed.
|
||||
inputElement.attr('aria-expanded', false);
|
||||
}
|
||||
// Read the current list of selections.
|
||||
inputElement.attr('aria-activedescendant', state.selectionId);
|
||||
|
||||
// Hide the suggestions list (from screen readers too).
|
||||
Aria.hide(suggestionsElement.get());
|
||||
|
||||
Reference in New Issue
Block a user