quailjs / quail

Accessibility testing in the browser and on the server.

Home Page:http://quailjs.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

data-cacheid aren't cleaned up before code snippets are taken

WilcoFiers opened this issue · comments

I've been finding a lot of data-cacheid attributes in the code snippets returned by Quail. I think this is caused by the color tests. This may be confusing to users.

Using elem.dataset or jQuery.data() should keep these out of the DOM.

Tried using dataset but it threw TypeError: 'undefined' is not an object (evaluating 'element.dataset.cacheId') during testing.

Pretty sure I'm missing something obvious here, but the jQuery .data() method seems to work and gets rid of these data-cacheid attributes in reports.

Fixed by PR #360 .