Skip to content

Commit

Permalink
Merge pull request #18044 from calixteman/bug1894849
Browse files Browse the repository at this point in the history
Avoid to aria-hide the structure tree (bug 1894849)
  • Loading branch information
calixteman committed May 6, 2024
2 parents d79aaee + 7742c3e commit 30d0e3a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions test/integration/accessibility_spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
1 change: 0 additions & 1 deletion web/pdf_page_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 30d0e3a

Please sign in to comment.