Skip to content

Commit

Permalink
Add inapplicable examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Jym77 committed Jul 12, 2022
1 parent 523026b commit 9a7a511
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/alfa-rules/test/sia-r16/rule.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,19 @@ test("evaluate() is inapplicable to elements that are not exposed", async (t) =>

t.deepEqual(await evaluate(R16, { document }), [inapplicable(R16)]);
});

test("evaluate() is inapplicable to elemnts with no explicit role", async (t) => {
const target = <input type="checkbox" />;

const document = h.document([target]);

t.deepEqual(await evaluate(R16, { document }), [inapplicable(R16)]);
});

test("evaluate() is inapplicable to elements with same explicit and implicit role", async (t) => {
const target = <input type="checkbox" role="checkbox" />;

const document = h.document([target]);

t.deepEqual(await evaluate(R16, { document }), [inapplicable(R16)]);
});

0 comments on commit 9a7a511

Please sign in to comment.