Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds custom reporter capability #210

Merged
merged 5 commits into from
Sep 4, 2020
Merged

Conversation

scalvert
Copy link
Contributor

@scalvert scalvert commented Sep 3, 2020

As part of #207, this PR adds a new reporter system that will allow us to provide custom reporting for accessibility violations for test runs.

The reporter conforms to the following interface:

interface A11yAuditReporter {
  (axeResults: AxeResults): Promise<void>;
}

A setCustomReporter is provided, allowing you to provide a custom A11yAuditReporter implementation.

export function setCustomReporter(
  customReporter: A11yAuditReporter = DEFAULT_REPORTER
): void;

This API provides the flexibility to shape the violations in any format you want.

addon-test-support/reporter.ts Outdated Show resolved Hide resolved
tests/acceptance/reporter-test.ts Outdated Show resolved Hide resolved
scalvert and others added 2 commits September 3, 2020 16:04
Co-authored-by: Robert Jackson <me@rwjblue.com>
Co-authored-by: Robert Jackson <me@rwjblue.com>
@scalvert scalvert requested review from drewlee and rwjblue September 3, 2020 23:05
@scalvert
Copy link
Contributor Author

scalvert commented Sep 4, 2020

@rwjblue I'm gonna stop accepting your suggestions since they keep killing my formatting!! JK! Fixed the prettier errors.

@rwjblue
Copy link
Member

rwjblue commented Sep 4, 2020

Haha! FINE! 😝

@rwjblue rwjblue merged commit ac297b0 into ember-a11y:master Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants