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

aria-label on input elements reports incorrectly critical issue depending on its type #2926

Closed
rastersysteme opened this issue May 11, 2021 · 3 comments
Labels
fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Milestone

Comments

@rastersysteme
Copy link

Product:
axe Extension

Actual:
Using aria-label on input elements with different used type attributes when no label is provided reports following error message:

Elements must only use allowed ARIA attributes

image

Exemplary some input types:

// critical issue
<input type="time" aria-label="some text" />
<input type="password" aria-label="some text" />
<input type="date" aria-label="some text" />

// no problem
<input type="number" aria-label="some text" />
<input type="search" aria-label="some text" />
<input type="text" aria-label="some text" />

Expectation:
No critical issue should be reported for all input types.

Motivation:
According to WAI-ARIA 1.1 and its practices this behaviour is wrong and should be corrected.


axe-core version: 4.2.0
axe DevTools - Web Accessibility Testing: 4.9.3

Platform: Mac
Browser: Chrome 90
@WilcoFiers
Copy link
Contributor

Thank you for reporting this. I actually found this exact issue yesterday too and had it on my todo list to report. Axe seems to have a problem determining the implicit role of these elements. Looks like a fairly simple thing to fix.

@WilcoFiers WilcoFiers added fix Bug fixes rules Issue or false result from an axe-core rule labels May 12, 2021
@WilcoFiers WilcoFiers added this to the axe-core 4.3 milestone May 12, 2021
@WilcoFiers
Copy link
Contributor

Forgot to reply, but there are actually two problems here. Firstly that axe-core is failing to identify some input types as textbox elements. The second is that global ARIA attributes are failing on elements with no implicit role. Another example of that is:

<canvas aria-label="hello world"></canvas>

@padmavemulapati
Copy link

Verified as part of #2933 , not reproducing the issue now

@straker straker added pr A pr has been created for the issue and removed qa labels Jun 10, 2021
@straker straker closed this as completed Jul 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule
Projects
None yet
Development

No branches or pull requests

4 participants