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

QInput uses not-allowed aria-readonly attribute #16705

Closed
hennzen opened this issue Dec 15, 2023 · 2 comments · Fixed by #16708
Closed

QInput uses not-allowed aria-readonly attribute #16705

hennzen opened this issue Dec 15, 2023 · 2 comments · Fixed by #16708
Assignees
Labels
area/a11y Accessibility area/components area/composables bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@hennzen
Copy link

hennzen commented Dec 15, 2023

What happened?

Our app needs to comply with WCAG guidelines, which is why we plan to integrate automated checks into our build pipeline as a first stop, prior to manual checks. We strive to reduce the amount of (sometimes non-critical or even purely technical as per specs) errors reported by Lighthouse et al., so that the important errors stay visible.

Currently, a q-input field set up as readonly causes an error "[aria-*] attributes do not match their roles" in Lighthouse (same as "Elements must only use supported ARIA attributes" in AxeDevTools).

What did you expect to happen?

The <label> element should not be using aria-readonly="true". Screenreaders will use the the HTML-native readonly attribute on the <input> field to properly announce read-only state to the user.

Reproduction URL

https://codepen.io/hennzen/pen/abXgpwy

How to reproduce?

  1. Go to the provided CodePen
  2. Open DevTools to either use Lighthouse or AxeDevTools Tab
  3. Generate report

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Components (quasar), Composables (quasar), Accessibility [a11y] (quasar)

Platforms/Browsers

Firefox, Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@pdanpdan
Copy link
Collaborator

Good point. It looks like aria-readonly should go away.

@hennzen
Copy link
Author

hennzen commented Dec 18, 2023

Thanks, that fix went fast 😍

pdanpdan added a commit to pdanpdan/quasar that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/a11y Accessibility area/components area/composables bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-vite kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
2 participants