MDL-87341 javascript: Fix aria label issue for navigation bar

This commit is contained in:
Tomo Tsuyuki
2025-12-15 10:37:52 +11:00
parent b357491d00
commit 7049a8334c
3 changed files with 7 additions and 4 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -408,8 +408,11 @@ function(
var pageItems = root.find(SELECTORS.PAGE_ITEM);
// We want to request all of the strings at once rather than
// one at a time.
var stringRequests = pageItems.toArray().map(function(index, page) {
var stringRequests = pageItems.toArray().map(function(page) {
page = $(page);
if (page.attr('data-page') == undefined) {
return {};
}
var pageNumber = getPageNumber(root, page);
if (pageNumber === activePageNumber) {
@@ -425,7 +428,7 @@ function(
param: pageNumber
};
}
});
}).filter(Boolean);
Str.get_strings(stringRequests).then(function(strings) {
pageItems.each(function(index, page) {