Skip to content
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

[Bug]: UI button tooltips unavailable to keyboard navigation users - make tooltip appear also via focus - Accessibility issue #19156

Open
dmer opened this issue Dec 3, 2024 · 6 comments

Comments

@dmer
Copy link

dmer commented Dec 3, 2024

Attach (recommended) or Link to PDF file

Applies to any PDF viewed in pdfjs
https://mozilla.github.io/pdf.js/web/viewer.html

Web browser and its version

Chrome Version 131.0.6778.86

Operating system and its version

Mac OS 14.6.1

PDF.js version

v4.3.136

Is the bug present in the latest PDF.js version?

Yes

Is a browser extension

No

Steps to reproduce the problem

  1. Open a PDF in pdfjs
  2. use the keyboard to navigate through the buttons in the toolbar

What is the expected behavior?

When I navigate to a button (e.g. "Highlight") with the keyboard (focus moves to Highlight button) the tooltip should show so that I know the purpose of the button.

What went wrong?

Mouse hover over the buttons shows a tooltip and I can get screen readers to read the button title, but for users purely using keyboard navigation, the button names are not shown.

Link to a viewer

https://mozilla.github.io/pdf.js/web/viewer.html

Additional context

This came up in a site Accessibility Audit.

@dmer dmer changed the title [Bug]: UI button tooltips unavailable to keyboard navigation users - make tooltip appear also via focus [Bug]: UI button tooltips unavailable to keyboard navigation users - make tooltip appear also via focus - Accessibility issue Dec 3, 2024
@Snuffleupagus
Copy link
Collaborator

Snuffleupagus commented Dec 3, 2024

When I navigate to a button (e.g. "Highlight") with the keyboard (focus moves to Highlight button) the tooltip should show so that I know the purpose of the button.

That doesn't appear to be the case for the main toolbar of the Firefox browser itself either, so if it's not even implemented in Firefox it's not obvious to me that we "need" to do that in the PDF.js viewer.

@calixteman
Copy link
Contributor

@dmer would you mind to point out some kind of a11y specs/recommendations about having such a tooltip ?

@calixteman
Copy link
Contributor

@anna-yeddi, wdyt ?

@dmer
Copy link
Author

dmer commented Dec 3, 2024

The auditors I'm working with flagged this as a problem with the WCAG Success Criteria: 2.1.1 Keyboard (A)
Essentially, button labels are not available to keyboard-only users.

@calixteman
Copy link
Contributor

The auditors I'm working with flagged this as a problem with the WCAG Success Criteria: 2.1.1 Keyboard (A) Essentially, button labels are not available to keyboard-only users.

Sorry I don't find anything specific about button labels/tooltips.

@dmer
Copy link
Author

dmer commented Dec 3, 2024

I'm admittedly new to WCAG a11y compliance work so I won't claim any expertise, but having read through the 2.1.1 Success Criteria documentation, it seems clear that their goal was not to itemize and specify every solution or recommendation, but rather to put in place some semantically clear criteria for each category. There is an element of subjective decision making one has to make when assessing a site or software. The criteria I linked begin with these statements:

Goal
Everything can be done with a keyboard except freehand movements.
What to do
Ensure pointer actions have a keyboard equivalent.
Why it's important
Many people rely on the keyboard interface, including blind and some mobility impaired people.

If I'm trying to use the PDFJS interface with only a keyboard and I don't already know what all the buttons do, I will be at a disadvantage since there is no displayed label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants