Skip to content

Commit 9c30713

Browse files
committed
chore: add output img to readme, add emoji to violation msg
1 parent 7a2d6e6 commit 9c30713

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

.changeset/seven-parents-poke.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"axe-testing-library": patch
3+
---
4+
5+
add emoji to violation msg, add output img to readme

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ test("should be accessible", async ({ page }) => {
8484
});
8585
```
8686

87+
### Example Output
88+
89+
For each accessibility violation you have, `axe-testing-library` will report the violation message along with a link to the rule. It also provide the rule id.
90+
91+
![axe testing library output with violation message, and link to rule and its rule id](./output.png)
92+
8793
## Configuration
8894

8995
Pass [axe run options](https://www.deque.com/axe/core-documentation/api-documentation/#options-parameter) to customize checks:

output.png

30.4 KB
Loading

src/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ export class AxeTester<TInput> {
8888
}, {}),
8989
violationMessages: results.violations.map(
9090
(v) =>
91-
`${v.impact?.toUpperCase()}: ${v.description}. See ${
91+
`⚠️ ${v.impact?.toUpperCase()}: ${v.description}. \n⚠️ See ${
9292
v.helpUrl
9393
} (Rule ID: ${v.id})`
9494
),

0 commit comments

Comments
 (0)