Skip to content

Commit

Permalink
feat(style): added wcag criteria to a11y violation (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
vaibhav-varshney authored Sep 1, 2023
1 parent cb5f02c commit 8549c87
Show file tree
Hide file tree
Showing 9 changed files with 230 additions and 106 deletions.
9 changes: 6 additions & 3 deletions packages/assert/__tests__/__snapshots__/assert.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 36 additions & 18 deletions packages/format/__tests__/__snapshots__/filter.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 36 additions & 18 deletions packages/format/__tests__/__snapshots__/format.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

54 changes: 36 additions & 18 deletions packages/format/__tests__/__snapshots__/result.test.ts.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion packages/format/src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ export class A11yError extends Error {
return (
options.highlighter(
`${options.a11yViolationIndicator} (${a11yResult.id}) ${a11yResult.description}: ${a11yResult.selectors}`
) + `\n\t${options.helpUrlIndicator} Help URL: ${a11yResult.helpUrl}`
) +
`\n\t${options.helpUrlIndicator} Help URL: ${a11yResult.helpUrl} \n\t${options.helpUrlIndicator} WCAG Criteria: ${a11yResult.wcag}`
);
})
.join('\n\n');
Expand Down
Loading

0 comments on commit 8549c87

Please sign in to comment.