1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #18044 from calixteman/bug1894849

Avoid to aria-hide the structure tree (bug 1894849)
This commit is contained in:
calixteman 2024-05-06 19:56:59 +02:00 committed by GitHub
commit 30d0e3a0ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 1 deletions

View file

@ -31,6 +31,18 @@ describe("accessibility", () => {
await Promise.all(
pages.map(async ([browserName, page]) => {
await page.waitForSelector(".structTree");
const isVisible = await page.evaluate(() => {
let elem = document.querySelector(".structTree");
while (elem) {
if (elem.getAttribute("aria-hidden") === "true") {
return false;
}
elem = elem.parentElement;
}
return true;
});
expect(isVisible).withContext(`In ${browserName}`).toBeTrue();
// Check the headings match up.
const head1 = await page.$eval(

View file

@ -908,7 +908,6 @@ class PDFPageView {
// overflow will be hidden in Firefox.
const canvasWrapper = document.createElement("div");
canvasWrapper.classList.add("canvasWrapper");
canvasWrapper.setAttribute("aria-hidden", true);
this.#addLayer(canvasWrapper, "canvasWrapper");
if (