Update the "aria-label" of the page when a pageLabel exists

Looking at the `PDFThumbnailView.setPageLabel` method you'll see that we update e.g. the "aria-label" of the thumbnail-image for documents that contain (valid) pageLabels.
This isn't done in `PDFPageView`, which seems inconsistent, hence this patch.
This commit is contained in:
Jonas Jenwald 2023-10-23 13:42:06 +02:00
parent 8376b3fb05
commit 04696080f8

View File

@ -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 {