Bug 1524564 - Set aria-activedescendant on the input rather than the view so the input delegates a11y focus. r=Standard8

Differential Revision: https://phabricator.services.mozilla.com/D23109

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dão Gottwald 2019-03-12 15:23:58 +00:00
parent 9dca2452ee
commit d29240242d

View File

@ -501,9 +501,9 @@ class UrlbarView {
if (item) {
item.toggleAttribute("selected", true);
item.toggleAttribute("aria-selected", true);
this._rows.setAttribute("aria-activedescendant", item.id);
this.input.inputField.setAttribute("aria-activedescendant", item.id);
} else {
this._rows.removeAttribute("aria-activedescendant");
this.input.inputField.removeAttribute("aria-activedescendant");
}
if (updateInput) {
@ -660,6 +660,7 @@ class UrlbarView {
_on_popuphiding() {
this.controller.cancelQuery();
this.window.removeEventListener("resize", this);
this.input.inputField.removeAttribute("aria-activedescendant");
}
_on_resize() {