зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1648468 - Part 6 - Resolve a11y focus issue causing a failure in browser_test_focus_urlbar.js. r=adw
The line that adds `suggestedIndex` in the test should also fix bug 1652138. Differential Revision: https://phabricator.services.mozilla.com/D83244
This commit is contained in:
Родитель
370555942c
Коммит
f9ae9c43a1
|
@ -337,6 +337,9 @@ async function runTipTests() {
|
|||
),
|
||||
];
|
||||
|
||||
// Ensure the tip appears in the expected position.
|
||||
matches[1].suggestedIndex = 2;
|
||||
|
||||
let provider = new TipTestProvider(matches);
|
||||
UrlbarProvidersManager.registerProvider(provider);
|
||||
|
||||
|
|
|
@ -547,6 +547,15 @@ class UrlbarView {
|
|||
});
|
||||
}
|
||||
|
||||
// If we update the selected element, a new unique ID is generated for it.
|
||||
// We need to ensure that aria-activedescendant reflects this new ID.
|
||||
if (this.selectedElement && !this.oneOffSearchButtons.selectedButton) {
|
||||
let aadID = this.input.inputField.getAttribute("aria-activedescendant");
|
||||
if (aadID && !this.document.getElementById(aadID)) {
|
||||
this._setAccessibleFocus(this.selectedElement);
|
||||
}
|
||||
}
|
||||
|
||||
this._openPanel();
|
||||
|
||||
if (firstResult.heuristic) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче