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

Toolbar elements not accessible to screen readers #3320

Closed
Ksan8 opened this issue Mar 26, 2021 · 7 comments
Closed

Toolbar elements not accessible to screen readers #3320

Ksan8 opened this issue Mar 26, 2021 · 7 comments

Comments

@Ksan8
Copy link

Ksan8 commented Mar 26, 2021

Any app that uses Quill will fail accessibility checks (such as the axe browser extension) due to the toolbar not being accessible to screen readers. This is a critical accessibility issue.

The issues Axe finds are:

  • ARIA commands must have an accessible name
  • Buttons must have discernible text

Providing a minimal, complete and verifiable example will further increase your chances that someone can help.

Steps for Reproduction

  1. Visit any webpage or app that uses the Quill editor (with at least one dropdown and a button), or download quill-minimal-example and follow the instructions to start a dev server
  2. Install the axe browser extension if not already installed
  3. Open DevTools and click on the axe tab
  4. Choose "Scan all of my page" after ensuring that all content is within view
  5. Notice the issues listed above appear in the axe results

Expected behavior:
All toolbar dropdowns and buttons should have aria-label attributes, which would allow them to be discernible to screen readers.

Actual behavior:
Currently, an element (such as a dropdown or picker) with .ql-picker-label have an aria-controls attribute, but no aria-label. They also have no title attribute, or other text that is visible to screen readers. All other buttons within the toolbar lack aria-label or title attributes as well.

Platforms:

  • Brave version 1.21.76 and Chrome version 89.0.4389.90
  • MacOS Big Sur version 11.2.3

Version:

  • Quill version 1.3.7
  • ngx-quill version 13.2.0
@clairefields15
Copy link
Contributor

I can work on this, having the same issue using this editor at work and seems like a simple fix.

@jobara
Copy link

jobara commented Jul 7, 2022

It looks like for the buttons you might just need to add the format as an aria-label to the addButton method. You might also need the value for things like lists. That was just for a quick look though, I'm not sure what's needed for the select boxes and other things.

For those looking for a temporary workaround, it may be possible to make a custom toolbar that included the aria-labels. See: https://quilljs.com/docs/modules/toolbar/

@clairefields15
Copy link
Contributor

clairefields15 commented Aug 24, 2022

@jobara unfortunately the temporary workaround does not work, check out this code sandbox using a screenreader. It looks like quill just looks for matching ql-foo containers and then inserts it's own markup (sans aria-labels) into those containers. I'm about to make a PR which adds aria labels to the toolbar

@hchang21
Copy link

@clairefields15 Any updates on this issue? I'm using v1.3.7, and the only part of the toolbar that reads with a screen reader is the option to set a heading level. Everything else still reads as blank buttons.

@samuelClo
Copy link

@clairefields15 Any updates on this issue? I'm using v1.3.7, and the only part of the toolbar that reads with a screen reader is the option to set a heading level. Everything else still reads as blank buttons.

You can make your own toolbar html and add aria label.

But it will be good to have a native implementation of basic accessibility.

@hchang21
Copy link

hchang21 commented Dec 6, 2023

Thanks for the tip

@quill-bot
Copy link

Quill 2.0 has been released (announcement post) with many changes and fixes. If this is still an issue please create a new issue after reviewing our updated Contributing guide 🙏

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

No branches or pull requests

6 participants