Merge pull request #17156 from Snuffleupagus/landmark-pageLabel
Update the "aria-label" of the page when a `pageLabel` exists
This commit is contained in:
commit
cc18d9749a
@ -1042,6 +1042,11 @@ class PDFPageView {
|
||||
setPageLabel(label) {
|
||||
this.pageLabel = typeof label === "string" ? label : null;
|
||||
|
||||
this.div.setAttribute(
|
||||
"data-l10n-args",
|
||||
JSON.stringify({ page: this.pageLabel ?? this.id })
|
||||
);
|
||||
|
||||
if (this.pageLabel !== null) {
|
||||
this.div.setAttribute("data-page-label", this.pageLabel);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user