From b8939082a1982ee24abb1950650e6f3164cb4259 Mon Sep 17 00:00:00 2001 From: Melonai Date: Sun, 3 Jan 2021 18:49:13 +0100 Subject: [PATCH] Test required ARIA props check --- .../input.svelte | 7 +++ .../warnings.json | 47 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/validator/samples/a11y-role-has-required-aria-props/input.svelte create mode 100644 test/validator/samples/a11y-role-has-required-aria-props/warnings.json diff --git a/test/validator/samples/a11y-role-has-required-aria-props/input.svelte b/test/validator/samples/a11y-role-has-required-aria-props/input.svelte new file mode 100644 index 000000000000..b3d2af589b4b --- /dev/null +++ b/test/validator/samples/a11y-role-has-required-aria-props/input.svelte @@ -0,0 +1,7 @@ +
+ +
+ +
+ +
\ No newline at end of file diff --git a/test/validator/samples/a11y-role-has-required-aria-props/warnings.json b/test/validator/samples/a11y-role-has-required-aria-props/warnings.json new file mode 100644 index 000000000000..4d898ebb8048 --- /dev/null +++ b/test/validator/samples/a11y-role-has-required-aria-props/warnings.json @@ -0,0 +1,47 @@ +[ + { + "code": "a11y-role-has-required-aria-props", + "message": "A11y: Elements with the ARIA role \"heading\" must have the following attributes defined: aria-level", + "start": { + "line": 1, + "column": 5, + "character": 5 + }, + "end": { + "line": 1, + "column": 19, + "character": 19 + }, + "pos": 5 + }, + { + "code": "a11y-role-has-required-aria-props", + "message": "A11y: Elements with the ARIA role \"checkbox\" must have the following attributes defined: aria-checked", + "start": { + "line": 2, + "column": 6, + "character": 33 + }, + "end": { + "line": 2, + "column": 21, + "character": 48 + }, + "pos": 33 + }, + { + "code": "a11y-role-has-required-aria-props", + "message": "A11y: Elements with the ARIA role \"meter\" must have the following attributes defined: aria-valuemax,aria-valuemin,aria-valuenow", + "start": { + "line": 3, + "column": 5, + "character": 62 + }, + "end": { + "line": 3, + "column": 17, + "character": 74 + }, + "pos": 62 + } +]