From 3d6baf5dd50da2989b071e2636d34780cbbafa43 Mon Sep 17 00:00:00 2001 From: Bassam Ismail Date: Tue, 23 Jun 2020 20:20:44 +0530 Subject: [PATCH] fix(5020): add tests to validate error isn't thrown when contenteditable is added --- .../errors.json | 17 +++++++++++++++++ .../input.svelte | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 test/validator/samples/a11y-contenteditable-element-without-child/errors.json create mode 100644 test/validator/samples/a11y-contenteditable-element-without-child/input.svelte diff --git a/test/validator/samples/a11y-contenteditable-element-without-child/errors.json b/test/validator/samples/a11y-contenteditable-element-without-child/errors.json new file mode 100644 index 0000000000..dd2a915b9d --- /dev/null +++ b/test/validator/samples/a11y-contenteditable-element-without-child/errors.json @@ -0,0 +1,17 @@ +[ + { + "code": "missing-contenteditable-attribute", + "message": "'contenteditable' attribute is required for textContent and innerHTML two-way bindings", + "start": { + "line": 6, + "column": 3, + "character": 157 + }, + "end": { + "line": 6, + "column": 24, + "character": 178 + }, + "pos": 157 + } +] diff --git a/test/validator/samples/a11y-contenteditable-element-without-child/input.svelte b/test/validator/samples/a11y-contenteditable-element-without-child/input.svelte new file mode 100644 index 0000000000..0702c3cb45 --- /dev/null +++ b/test/validator/samples/a11y-contenteditable-element-without-child/input.svelte @@ -0,0 +1,6 @@ + +

+

+