component-driven / component-driven/cypress-axe
How to disable standard output when using custom logging
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 641
- Forks
- 90
- Avg merge
- 6h 8m
- Merged PRs (30d)
- 1
Description
I'm using the violationCallback parameter of cy.checkA11y() to implement custom logging. Like this:
cy.checkA11y(undefined, undefined, showViolations);
const showViolations = (violations: Result[]) => {
violations.forEach((violation: Result) => {
const { nodes, helpUrl, help, impact } = violation;
const nodesList = nodes.map((node: NodeResult) => node.target).join(', ');
const name = `${impact || ''} a11y error`;
const message = `[${help}](${helpUrl}) affecting the following node(s): [${nodesList}]. Check the console for additional error details.`;
Cypress.log({
name,
message,
consoleProps: () => violation,
$el: Cypress.$(nodesList),
});
});
};
When I do this, I see my custom logs followed by the standard output. Eg:

I don't want to see the standard output if I have custom logging in place. How can I accomplish this?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at cy.checkA11y() and trace how violationCallback is handled alongside the standard output. Look for the existing logging path and related tests, if present. Done means custom Cypress logs remain visible while the standard accessibility output can be disabled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cypress, typescript
- Domain
- accessibility, testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100