component-driven / component-driven/cypress-axe

checkA11y() callback won't fire if there are no violations

Open
#128 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
641
Forks
90
Avg merge
6h 8m
Merged PRs (30d)
1

Description

Hi there, I was wondering if there was a way to fire checkA11y()'s callback even though there are no violations, even if violations variable was passed as an empty array.

https://github.com/component-driven/cypress-axe/blob/8d47177d9452964c167b7fde23659a192afe8ccb/src/index.ts#L80

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/index.ts at the checkA11y() implementation around line 80, focusing on how an empty violations array affects callback execution. Confirm the callback runs when there are no violations, including when violations is explicitly empty; the payload does not name a test file to run.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
accessibility, testing
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.