diff --git a/web/pdf_page_view.js b/web/pdf_page_view.js index 68e18a4a1..0c946e1c0 100644 --- a/web/pdf_page_view.js +++ b/web/pdf_page_view.js @@ -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 {