forked from quailjs/quail
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
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.