-
Notifications
You must be signed in to change notification settings - Fork 247
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
Incorrect Reporting of: This element's role is "presentation" but contains child elements with semantic meaning. #191
Comments
I would like to ask about this issue too. We have now cca 300 role presentation errors - Dojo Toolkit widgets. Does your error checker work well? |
Thinking about this error. I cant think of any cases where this would be a error. If a developer decides to use role="presentation" then almost always 't they going to be hiding content/semantical elements for some reason. |
error sounds dangerous, maybe it should be classified as warning |
Yeah, Maybe warning. "Make sure your content under role='presentation' really doesnt have semantic meaning" |
in this case it is generated by Dojo Toolkit framework, its widgets. |
I also get this incorrect error on tables marked as presentational, even though they do not contain semantic table elements like |
I think the bug here is testing HTML elements which shouldn't be tested, not that the test is invalid. From the reference on https://www.w3.org/TR/wai-aria/roles#presentation
ie, I was looking into the SVG issue and noticed that dropping @tmcconechy 's example would be addressed by tweaking the selector query of @robfentress do you have some testable HTML? What you're describing sounds like a different root cause. Might be fixed by making the |
…th role=presentation assigned and all parent nodes before checking any child elements that have semantic meaning.
Thanks @sgregson. I've updated with a small fix to test aria hidden on the element with role assigned and it's parent nodes. The test for the issue @robfentress will require a little more research, but I suspect the expansion of the white list would be the simplest fix. If you'd like to submit a PR I'll assign some time to take a look at it. |
I'm still getting the same number of reports on the "bookmarklet" tool. http://squizlabs.github.io/HTML_CodeSniffer/ Is that updated (or takes a while to update)? |
We generally don't updated the bookmarklet until we've tagged a release so the currently bookmarklet code won't contain these fixes on the master branch. It's overdue so I'll organise a release with recent fixes in the near future. |
We have this problem on definition lists ( |
@hugogiraudel Sure, it's worth opening an issue. Paste some example failing content and I'll look into it. |
…lement with role=presentation assigned and all parent nodes before checking any child elements that have semantic meaning.
Working with our screen reader users we figured out we need to define our icons like this or they can get read buy IE / Certain browsers and this covers all cases
However, starting recently this now reports: This element's role is "presentation" but contains child elements with semantic meaning.
Should it skip the case of SVG elements with only use tags?
The text was updated successfully, but these errors were encountered: