Skip to content

Section 508 accessibility issue with underlying Canvas element with no name. #14437

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rgutierrezatx opened this issue Jan 10, 2022 · 12 comments · Fixed by #15001
Closed

Section 508 accessibility issue with underlying Canvas element with no name. #14437

rgutierrezatx opened this issue Jan 10, 2022 · 12 comments · Fixed by #15001

Comments

@rgutierrezatx
Copy link

rgutierrezatx commented Jan 10, 2022

Configuration:

  • Chrome Version 96.0.4664.110 (Official Build) (64-bit)
  • Windows 10
  • PDF.js version: linked to official demo of pdf viewer
  • Is a browser extension: no

Steps to reproduce the problem:

  1. Go to official mozilla pdf viewer demo at https://mozilla.github.io/pdf.js/web/viewer.html
  2. run ANDI ( https://www.ssa.gov/accessibility/andi/help/install.html )

What is the expected behavior? the underlying Canvas should have an accessible name

What went wrong? see screenshot for the error. A name should be set or at least allow us to set this name

Untitled

@Snuffleupagus
Copy link
Collaborator

@brendandahl Is this somewhat expected after PR #13118 (which removed the "aria-label" on the canvas-elements), or is that not entirely relevant here?

@rgutierrezatx
Copy link
Author

rgutierrezatx commented Jan 13, 2022

@Snuffleupagus appreciate the quick response to this issue. We are hoping for a quick turn-around since this one minor issue puts the whole thing out of compliance for Section 508 accessibility.

@marco-c
Copy link
Contributor

marco-c commented Jun 7, 2022

@MReschenberg is this something you could help us with? In #13118 we removed the aria-label from the canvas as it was not needed anymore (see discussion at #13118 (comment) for the reason).
Is there any way to tell that the element doesn't need an aria-label or something like that?

@marco-c
Copy link
Contributor

marco-c commented Jun 7, 2022

Maybe we can set "aria-labelledby" on the canvas to point to the div that contains it?

@Snuffleupagus
Copy link
Collaborator

Maybe we can set "aria-labelledby" on the canvas to point to the div that contains it?

That would likely be problematical, since I'm assuming that it'd require adding unique ids to the pages in the viewer; please refer to issue #11499 and PR #11503 for context.

@MReschenberg
Copy link

MReschenberg commented Jun 7, 2022

@MReschenberg is this something you could help us with? In #13118 we removed the aria-label from the canvas as it was not needed anymore (see discussion at #13118 (comment) for the reason). Is there any way to tell that the element doesn't need an aria-label or something like that?

What's the semantic use of the <canvas> element inside of the region? It looks like we're using the <region> to define the page area, and the canvas to draw the page background. If the <canvas> is purely presentational, it should have role=presentation, which will also make it so it no longer requires a label attribute.

@rgutierrezatx
Copy link
Author

has the viewer at https://mozilla.github.io/pdf.js/web/viewer.html been updated with this change? i still get the same accessibility name issue.

@marco-c marco-c reopened this Jun 20, 2022
@marco-c
Copy link
Contributor

marco-c commented Jun 20, 2022

@MReschenberg it looks like this ANDI tool from the US government considers the <canvas role="presentation"> element as problematic because it doesn't have an accessible name:
immagine

@marco-c
Copy link
Contributor

marco-c commented Jun 20, 2022

I wonder if this isn't a bug in the ANDI tool...

@marco-c
Copy link
Contributor

marco-c commented Jun 20, 2022

Yes, I think so, I even tried with an empty page with just the canvas and role presentation and ANDI is still complaining. Probably it isn't taking into account the role.

@rgutierrezatx do you have a way to report this problem to the ANDI developers?

@marco-c
Copy link
Contributor

marco-c commented Jun 20, 2022

I filed SSAgov/ANDI#138 on the ANDI GitHub repo.

@rgutierrezatx
Copy link
Author

I filed SSAgov/ANDI#138 on the ANDI GitHub repo.

ANDI resolved the issue in their tooling and closed your ticket. thanks!

@marco-c marco-c moved this to Closed in PDF.js quality Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Closed
Development

Successfully merging a pull request may close this issue.

6 participants