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

Elements with aria-hidden="true" still included in output of Screen Reader Wand #133

Open
johnpgreen opened this issue Jan 14, 2019 · 5 comments · May be fixed by #134
Open

Elements with aria-hidden="true" still included in output of Screen Reader Wand #133

johnpgreen opened this issue Jan 14, 2019 · 5 comments · May be fixed by #134

Comments

@johnpgreen
Copy link

Elements that have an aria-hidden attribute set to "true" as well as children of said elements are included in the output of the Screen Reader Wand tool.

@ericrallen
Copy link

ericrallen commented Mar 9, 2019

@johnpgreen I wasn't able to reproduce this one. Is there any chance you have an example you could point to?

The underlying logic that the accessibility-developer-tools library uses to decide what text a screen reader would see appears to take aria-hidden into account: https://github.com/GoogleChrome/accessibility-developer-tools/blob/3d7c96bf34b3146f40aeb2720e0927f221ad8725/src/js/AccessibilityUtils.js#L590

@johnpgreen
Copy link
Author

Hovering over this

<button type="button">Next<span aria-hidden="true">►</span></button>

reports

"Next ►"

Interestingly, hovering over just the arrow reports "No text visible to a screen reader."

@ericrallen
Copy link

ericrallen commented Mar 9, 2019

@johnpgreen I see it now. For some reason putting the hidden content inside of my test element didn't occur to me.

A similar test case:

<article>
  <p>This paragraph is visible.</p>
  <p>This paragraph has a <span aria-hidden="true">hidden</span> span.</p>
  <p aria-hidden="true">This paragraph is hidden.</p>
</article>

Hovering over the article displays:

This paragraph is visible. This paragraph has a hidden span. This paragraph is hidden.

Hovering over the second p displays:

This paragraph has a hidden span.

Hovering over the span displays:

No text visible to a screen reader

Hovering over the last p displays:

No text visible to a screen reader

@ericrallen
Copy link

I think I found a fix, just trying to get a test added before submitting a PR.

ericrallen added a commit to ericrallen/tota11y that referenced this issue Mar 9, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue Mar 9, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
@ericrallen
Copy link

@johnpgreen There's a PR (#134) that addresses this issue awaiting review. I've tested it a good bit and written tests for it, but if you want to pull it down and test it out, too, that would be great.

ericrallen added a commit to ericrallen/tota11y that referenced this issue Mar 15, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue Mar 16, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue Mar 16, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue Apr 15, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue May 17, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
ericrallen added a commit to ericrallen/tota11y that referenced this issue May 19, 2019
We needed to set the recursive argument in the findTextAlternatives method to true so that accessibility-developer-tools would check for nested hidden elements.

This also adds two simple tests to make sure that this functionalit isn't broken in the future.

Closes jdan#133
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

Successfully merging a pull request may close this issue.

2 participants