component-driven / cypress-axe

Test accessibility with axe-core in Cypress
MIT License
622 stars 86 forks source link

Issue 67 - Add callback to return full axe-core results object #68

Open gilgold opened 4 years ago

gilgold commented 4 years ago
kristina-hager commented 4 years ago

I'm thinking about a new API for the next major release, and probably we'll need to replace all positional arguments of checkA11y with an object because we already have way too many and they are all optional.

big plus 1 to using an object for the args. also, if there will be big changes, i'd suggest just dropping 'violationsCallback' in favor of 'resultsCallback'. It would be pretty easy for a resultsCallback to focus just on violations.

sapegin commented 4 years ago

That's a good point!

kristina-hager commented 4 years ago

@sapegin - Hi, do you have any ETA for the new API to move to an arguments object? Do you need any help with this? We are using an internal fork of this lib due to the need for a full results object. We'd rather help out with this version so we can retire our internal fork. Please let me know what can help! I could, for example, create a PR to move the existing supported options to an args object. That would allow PRs like this and some of the other open ones to rebase and redo their PRs.

sapegin commented 4 years ago

I drafted my ideas on the new API: #75. I hope this covers your use case — let me know what you think.