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: reports incorrect error on aria-errormessage (ARIA 1.2) #3149

Closed
Zidious opened this issue Sep 7, 2021 · 4 comments
Closed

Bug: reports incorrect error on aria-errormessage (ARIA 1.2) #3149

Zidious opened this issue Sep 7, 2021 · 4 comments
Assignees
Labels
fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule

Comments

@Zidious
Copy link
Contributor

Zidious commented Sep 7, 2021

Ref: dequelabs/axe-core-npm#328

ARIA 1.2

axe-core not reporting that content is hidden when aria-errormessage is referenced by a hidden element.

@dylanb
Copy link
Contributor

dylanb commented Sep 8, 2021

Is the error incorrect or is it just missing the information about the content being hidden?
What about aria-labelledby as a way to announce the error message in addition to the ones we currently check for?

@Zidious
Copy link
Contributor Author

Zidious commented Sep 9, 2021

One of the examples given was:

<input type="text" id="input-1" aria-invalid="true" aria-errormessage="id-message-1" ></div>
<div id="id-message-1" hidden>Error message 1</div>

In ARIA 1.2, it should say something about the content being hidden in this case the hidden div I have played around with in aria-errormessage-evaluate.js and I can get the rule to move into the incomplete but it would involve amending the corresponding .json file to state ensure aria-errormessage value references an existing visible element. Is this something we would want to do? I could push the PR, would like some eyes on it.

Edit: had some feedback on it during a pairing session - will amend and then push.

@straker straker added fix Bug fixes pr A pr has been created for the issue rules Issue or false result from an axe-core rule labels Oct 7, 2021
@straker
Copy link
Contributor

straker commented Oct 7, 2021

cc @spectranaut. Fixed in #3156

@padmavemulapati
Copy link

padmavemulapati commented Oct 15, 2021

Validated with the latest axe-core-develop branch code base,
Seeing the proper error message on aria-errormessage , when content is hidden and is referenced by a hidden element.
image

Earlier the message is be like
image

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

6 participants