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

Mark all failing tags with an ID and include it in the message #14

Merged
merged 3 commits into from May 13, 2015
Merged

Mark all failing tags with an ID and include it in the message #14

merged 3 commits into from May 13, 2015

Conversation

AsaAyers
Copy link
Contributor

@AsaAyers AsaAyers commented Mar 4, 2015

This PR restructures assertAccessibility so that when an element fails it can add a unique id (if one doesn't already exist) and logs it in the message.

 #a11y-0 You have an anchor with `href="#"` and no `role` DOM property. Add `role="button"` or better yet, use a `<button/>`.

document.getElementById('a11y-0') will show me the element that is failing. Then with Reveal in Elements Panel (Chrome's terminology) you can track down where it is.

Closes #11
Closes #9
This is a better solution as it marks all of your elements so you can find them. No need to guess based on a stack or logging the props.

@michaelpacker
Copy link

This is pretty darn helpful!

@AsaAyers
Copy link
Contributor Author

ping @ryanflorence

@AsaAyers
Copy link
Contributor Author

This and all of my other PRs are available with npm install @asaayers/react-a11y
@asaayers/react-a11y

kloots added a commit that referenced this pull request May 13, 2015
Mark all failing tags with an ID and include it in the message
@kloots kloots merged commit 803325d into reactjs:master May 13, 2015
@AsaAyers AsaAyers mentioned this pull request Jul 30, 2015
erin-doyle pushed a commit that referenced this pull request Nov 14, 2017
Fixed #11 from being too strict testing for use-onblur-not-onchange. …
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 this pull request may close these issues.

None yet

3 participants