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

Case might fire multiple resolve events #18

Open
mlewand opened this issue Aug 7, 2015 · 0 comments
Open

Case might fire multiple resolve events #18

mlewand opened this issue Aug 7, 2015 · 0 comments
Labels

Comments

@mlewand
Copy link

mlewand commented Aug 7, 2015

Currently it's possible for Case instance to fire multiple resolve events. It occurs e.g. in headersAttrRefersToATableCell assessment.

You can run accessibility-tests/headersAttrRefersToATableCell.html test to experience this issue. With current master-2.2.x it will produce 16 assertions, out of 8 tables (tested elements).

Reason

The reason for this issue is $.each loop in headersAttrRefersToATableCell.js.

To understand it we need to remember that setting a case status will dispatch resolve event. In code mentioned above $.each function changes _case status for every matched header / cell. So as a result we have multiple resolve events.

We should prevent this kind of situation, or even throw an error if someone is doing so.

@mlewand mlewand added the bug label Aug 7, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant