Commit 6b6ae3da authored by David Sveningsson's avatar David Sveningsson

feat(rules): add selector to reported errors

parent 12e718ec
Pipeline #112389092 passed with stages
in 10 minutes and 31 seconds
......@@ -13,6 +13,7 @@ Array [
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 1,
"ruleId": "WCAG/H37",
"selector": "img",
"severity": 2,
"size": 3,
},
......@@ -26,6 +27,7 @@ Array [
"message": "<button> is missing required \\"type\\" attribute",
"offset": 22,
"ruleId": "element-required-attributes",
"selector": "button",
"severity": 2,
"size": 6,
},
......@@ -36,6 +38,7 @@ Array [
"message": "<input> element does not have a <label>",
"offset": 130,
"ruleId": "input-missing-label",
"selector": "div > input",
"severity": 2,
"size": 5,
},
......@@ -65,6 +68,7 @@ Array [
"message": "Element <my-block> is not permitted as content in <my-inline>",
"offset": 15,
"ruleId": "element-permitted-content",
"selector": "my-inline > my-block",
"severity": 2,
"size": 8,
},
......@@ -75,6 +79,7 @@ Array [
"message": "<my-deprecated> is deprecated: replaced with <my-other>",
"offset": 39,
"ruleId": "deprecated",
"selector": "my-inline > my-deprecated",
"severity": 2,
"size": 13,
},
......@@ -101,6 +106,7 @@ Array [
"message": "Element <legend> must be used before <p> in this context",
"offset": 65,
"ruleId": "element-permitted-order",
"selector": "footer > fieldset > legend",
"severity": 2,
"size": 6,
},
......@@ -111,6 +117,7 @@ Array [
"message": "Element <main> is not permitted as descendant of <footer>",
"offset": 127,
"ruleId": "element-permitted-content",
"selector": "footer > main",
"severity": 2,
"size": 4,
},
......@@ -121,6 +128,7 @@ Array [
"message": "<blink> is deprecated",
"offset": 138,
"ruleId": "deprecated",
"selector": "footer > main > blink",
"severity": 2,
"size": 5,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Element <div> is not permitted as content in <my-component>",
"offset": 76,
"ruleId": "element-permitted-content",
"selector": "my-component:nth-child(2) > div",
"severity": 2,
"size": 3,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Attribute \\"quacks\\" should omit value",
"offset": 54,
"ruleId": "attribute-boolean-style",
"selector": "my-component:nth-child(2)",
"severity": 2,
"size": 6,
},
......@@ -28,6 +29,7 @@ Array [
"message": "Attribute \\"quacks\\" has invalid value \\"duck\\"",
"offset": 62,
"ruleId": "attribute-allowed-values",
"selector": "my-component:nth-child(2)",
"severity": 2,
"size": 4,
},
......@@ -52,6 +54,7 @@ Array [
"message": "Attribute \\"duck\\" is deprecated on <my-component> element",
"offset": 14,
"ruleId": "no-deprecated-attr",
"selector": "my-component",
"severity": 2,
"size": 4,
},
......@@ -85,6 +88,7 @@ Array [
"message": "Attribute \\"duck\\" has invalid value \\"flintheart\\"",
"offset": 66,
"ruleId": "attribute-allowed-values",
"selector": "my-component:nth-child(2)",
"severity": 2,
"size": 10,
},
......@@ -116,6 +120,7 @@ Array [
"message": "Attribute \\"ducks\\" has invalid value \\"huey\\"",
"offset": 64,
"ruleId": "attribute-allowed-values",
"selector": "my-component:nth-child(2)",
"severity": 2,
"size": 4,
},
......@@ -143,6 +148,7 @@ Array [
"message": "<my-component> is missing required \\"duck\\" attribute",
"offset": 47,
"ruleId": "element-required-attributes",
"selector": "my-component:nth-child(2)",
"severity": 2,
"size": 12,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Element <footer> is not permitted as descendant of <my-component>",
"offset": 63,
"ruleId": "element-permitted-content",
"selector": "my-component > div > footer",
"severity": 2,
"size": 6,
},
......@@ -23,6 +24,7 @@ Array [
"message": "Element <my-component> is not permitted as descendant of <my-component>",
"offset": 137,
"ruleId": "element-permitted-content",
"selector": "my-component > div > my-component",
"severity": 2,
"size": 12,
},
......@@ -58,6 +60,7 @@ Array [
"message": "Element <h1> is not permitted as content in <my-component>",
"offset": 67,
"ruleId": "element-permitted-content",
"selector": "my-component > h1",
"severity": 2,
"size": 2,
},
......@@ -85,6 +88,7 @@ Array [
"message": "Element <button> is not permitted as content in <my-component>",
"offset": 18,
"ruleId": "element-permitted-content",
"selector": "my-component > button",
"severity": 2,
"size": 6,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Element <my-component> is not permitted as content in <div>",
"offset": 9,
"ruleId": "element-permitted-content",
"selector": "div > my-component",
"severity": 2,
"size": 12,
},
......@@ -38,6 +39,7 @@ Array [
"message": "Element <my-component> is not permitted as content in <span>",
"offset": 10,
"ruleId": "element-permitted-content",
"selector": "span > my-component",
"severity": 2,
"size": 12,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Attribute \\"ID\\" should be lowercase",
"offset": 3,
"ruleId": "attr-case",
"selector": "p",
"severity": 2,
"size": 2,
},
......@@ -38,6 +39,7 @@ Array [
"message": "Attribute \\"fooBar\\" should be lowercase or uppercase",
"offset": 33,
"ruleId": "attr-case",
"selector": "p:nth-child(3)",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Attribute \\"class\\" used ' instead of expected \\"",
"offset": 3,
"ruleId": "attr-quotes",
"selector": "p",
"severity": 2,
"size": 5,
},
......
......@@ -43,6 +43,7 @@ Array [
"message": "Attribute \\"type\\" has invalid value \\"foobar\\"",
"offset": 13,
"ruleId": "attribute-allowed-values",
"selector": "input",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Attribute \\"required\\" should omit value",
"offset": 7,
"ruleId": "attribute-boolean-style",
"selector": "input:nth-child(1)",
"severity": 2,
"size": 8,
},
......@@ -25,6 +26,7 @@ Array [
"message": "Attribute \\"required\\" should omit value",
"offset": 27,
"ruleId": "attribute-boolean-style",
"selector": "input:nth-child(2)",
"severity": 2,
"size": 8,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Class \\"fooBar\\" does not match required pattern \\"/^[a-z0-9-]+$/\\"",
"offset": 12,
"ruleId": "class-pattern",
"selector": "div",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Close tags cannot have attributes",
"offset": 11,
"ruleId": "close-attr",
"selector": null,
"severity": 2,
"size": 2,
},
......
......@@ -17,6 +17,7 @@ Array [
"message": "Mismatched close-tag, expected '</strong>' but found '</p>'.",
"offset": 43,
"ruleId": "close-order",
"selector": null,
"severity": 2,
"size": 2,
},
......@@ -27,6 +28,7 @@ Array [
"message": "Mismatched close-tag, expected '</p>' but found '</strong>'.",
"offset": 47,
"ruleId": "close-order",
"selector": null,
"severity": 2,
"size": 7,
},
......@@ -51,6 +53,7 @@ Array [
"message": "Missing close-tag, expected '</div>' but document ended before it was found.",
"offset": 36,
"ruleId": "close-order",
"selector": null,
"severity": 2,
"size": 0,
},
......@@ -75,6 +78,7 @@ Array [
"message": "Unexpected close-tag, expected opening tag.",
"offset": 32,
"ruleId": "close-order",
"selector": null,
"severity": 2,
"size": 4,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "<my-element> is deprecated: replaced with <other-element>",
"offset": 1,
"ruleId": "deprecated",
"selector": "my-element",
"severity": 2,
"size": 10,
},
......@@ -38,6 +39,7 @@ Array [
"message": "<center> is deprecated",
"offset": 1,
"ruleId": "deprecated",
"selector": "center",
"severity": 2,
"size": 6,
},
......@@ -48,6 +50,7 @@ Array [
"message": "<big> is deprecated",
"offset": 22,
"ruleId": "deprecated",
"selector": "big",
"severity": 2,
"size": 3,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "doctype should be \\"html\\"",
"offset": 10,
"ruleId": "doctype-html",
"selector": null,
"severity": 2,
"size": 79,
},
......@@ -38,6 +39,7 @@ Array [
"message": "doctype should be \\"html\\"",
"offset": 10,
"ruleId": "doctype-html",
"selector": null,
"severity": 2,
"size": 33,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Element \\"DIV\\" should be lowercase",
"offset": 1,
"ruleId": "element-case",
"selector": "div",
"severity": 2,
"size": 3,
},
......@@ -38,6 +39,7 @@ Array [
"message": "Start and end tag must not differ in casing",
"offset": 12,
"ruleId": "element-case",
"selector": "foobar",
"severity": 2,
"size": 7,
},
......@@ -61,6 +63,7 @@ Array [
"message": "Element \\"fooBar\\" should be lowercase or PascalCase",
"offset": 39,
"ruleId": "element-case",
"selector": "foobar:nth-child(3)",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "<foobar> is not a valid element name",
"offset": 1,
"ruleId": "element-name",
"selector": "foobar",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Element <li> is not permitted as content in <div>",
"offset": 69,
"ruleId": "element-permitted-content",
"selector": "div > li",
"severity": 2,
"size": 2,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Element <tfoot> can only appear once under <table>",
"offset": 77,
"ruleId": "element-permitted-occurrences",
"selector": "table > tfoot:nth-child(2)",
"severity": 2,
"size": 5,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Element <caption> must be used before <thead> in this context",
"offset": 82,
"ruleId": "element-permitted-order",
"selector": "table > caption",
"severity": 2,
"size": 7,
},
......
......@@ -18,6 +18,7 @@ Array [
"message": "<input> is missing required \\"type\\" attribute",
"offset": 1,
"ruleId": "element-required-attributes",
"selector": "input",
"severity": 2,
"size": 5,
},
......
......@@ -18,6 +18,7 @@ Array [
"message": "<html> element must have <body> as content",
"offset": 1,
"ruleId": "element-required-content",
"selector": "html",
"severity": 2,
"size": 4,
},
......@@ -31,6 +32,7 @@ Array [
"message": "<head> element must have <title> as content",
"offset": 12,
"ruleId": "element-required-content",
"selector": "html > head",
"severity": 2,
"size": 4,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "<h1> cannot be empty, must have text content",
"offset": 1,
"ruleId": "empty-heading",
"selector": "h1",
"severity": 2,
"size": 2,
},
......@@ -25,6 +26,7 @@ Array [
"message": "<h2> cannot be empty, must have text content",
"offset": 11,
"ruleId": "empty-heading",
"selector": "h2",
"severity": 2,
"size": 2,
},
......@@ -49,6 +51,7 @@ Array [
"message": "<h1> cannot be empty, must have text content",
"offset": 1,
"ruleId": "empty-heading",
"selector": "h1",
"severity": 2,
"size": 2,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "<title> cannot be empty, must have text content",
"offset": 25,
"ruleId": "empty-title",
"selector": "head > title",
"severity": 2,
"size": 1,
},
......@@ -40,6 +41,7 @@ Array [
"message": "<title> cannot be empty, must have text content",
"offset": 26,
"ruleId": "empty-title",
"selector": "head > title",
"severity": 2,
"size": 1,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Heading level can only increase by one, expected h2",
"offset": 20,
"ruleId": "heading-level",
"selector": "h3",
"severity": 2,
"size": 2,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "ID \\"fooBar\\" does not match required pattern \\"/^[a-z0-9-]+$/\\"",
"offset": 9,
"ruleId": "id-pattern",
"selector": "div",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "<input> element does not have a <label>",
"offset": 74,
"ruleId": "input-missing-label",
"selector": "div:nth-child(1) > input",
"severity": 2,
"size": 5,
},
......@@ -25,6 +26,7 @@ Array [
"message": "<textarea> element does not have a <label>",
"offset": 98,
"ruleId": "input-missing-label",
"selector": "div:nth-child(1) > textarea",
"severity": 2,
"size": 8,
},
......@@ -35,6 +37,7 @@ Array [
"message": "<select> element does not have a <label>",
"offset": 124,
"ruleId": "input-missing-label",
"selector": "div:nth-child(1) > select",
"severity": 2,
"size": 6,
},
......@@ -45,6 +48,7 @@ Array [
"message": "<input> element does not have a <label>",
"offset": 253,
"ruleId": "input-missing-label",
"selector": "div:nth-child(2) > input",
"severity": 2,
"size": 5,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "title text cannot be longer than 70 characters",
"offset": 148,
"ruleId": "long-title",
"selector": "head > title",
"severity": 2,
"size": 1,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Meta refresh must use 0 second delay",
"offset": 36,
"ruleId": "meta-refresh",
"selector": "meta",
"severity": 2,
"size": 17,
},
......@@ -38,6 +39,7 @@ Array [
"message": "Don't use meta refresh to reload the page",
"offset": 36,
"ruleId": "meta-refresh",
"selector": "meta",
"severity": 2,
"size": 1,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Document is missing doctype",
"offset": 0,
"ruleId": "missing-doctype",
"selector": null,
"severity": 2,
"size": 0,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Use of conditional comments are deprecated",
"offset": 0,
"ruleId": "no-conditional-comment",
"selector": null,
"severity": 2,
"size": 12,
},
......@@ -23,6 +24,7 @@ Array [
"message": "Use of conditional comments are deprecated",
"offset": 53,
"ruleId": "no-conditional-comment",
"selector": null,
"severity": 2,
"size": 12,
},
......@@ -33,6 +35,7 @@ Array [
"message": "Use of conditional comments are deprecated",
"offset": 67,
"ruleId": "no-conditional-comment",
"selector": null,
"severity": 2,
"size": 11,
},
......@@ -43,6 +46,7 @@ Array [
"message": "Use of conditional comments are deprecated",
"offset": 123,
"ruleId": "no-conditional-comment",
"selector": null,
"severity": 2,
"size": 10,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Attribute \\"bgcolor\\" is deprecated on <body> element",
"offset": 6,
"ruleId": "no-deprecated-attr",
"selector": "body",
"severity": 2,
"size": 7,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Attribute \\"class\\" duplicated",
"offset": 17,
"ruleId": "no-dup-attr",
"selector": "div",
"severity": 2,
"size": 5,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Class \\"foo\\" duplicated",
"offset": 12,
"ruleId": "no-dup-class",
"selector": "div",
"severity": 2,
"size": 11,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Duplicate ID \\"foo\\"",
"offset": 30,
"ruleId": "no-dup-id",
"selector": "div:nth-child(2)",
"severity": 2,
"size": 3,
},
......
......@@ -13,6 +13,7 @@ Array [
"message": "Element <p> is implicitly closed by adjacent <div>",
"offset": 1,
"ruleId": "no-implicit-close",
"selector": "p",
"severity": 2,
"size": 1,
},
......@@ -42,6 +43,7 @@ Array [
"message": "Element <li> is implicitly closed by sibling",
"offset": 10,
"ruleId": "no-implicit-close",
"selector": "ul > li:nth-child(1)",
"severity": 2,
"size": 2,
},
......@@ -52,6 +54,7 @@ Array [
"message": "Element <li> is implicitly closed by sibling",
"offset": 22,
"ruleId": "no-implicit-close",
"selector": "ul > li:nth-child(2)",
"severity": 2,
"size": 2,
},
......@@ -62,6 +65,7 @@ Array [
"message": "Element <li> is implicitly closed by parent </ul>",
"offset": 34,
"ruleId": "no-implicit-close",
"selector": "ul > li:nth-child(3)",
"severity": 2,
"size": 2,
},
......@@ -89,6 +93,7 @@ Array [
"message": "Element <p> is implicitly closed by sibling",
"offset": 1,
"ruleId": "no-implicit-close",
"selector": "p:nth-child(1)",
"severity": 2,
"size": 1,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Inline style is not allowed",
"offset": 3,
"ruleId": "no-inline-style",
"selector": "p",
"severity": 2,
"size": 5,
},
......
......@@ -18,6 +18,7 @@ Array [
"message": "Element references missing id \\"missing-input\\"",
"offset": 12,
"ruleId": "no-missing-references",
"selector": "label",
"severity": 2,
"size": 13,
},
......@@ -31,6 +32,7 @@ Array [
"message": "Element references missing id \\"missing-text\\"",
"offset": 58,
"ruleId": "no-missing-references",
"selector": "div:nth-child(2)",
"severity": 2,
"size": 12,
},
......@@ -44,6 +46,7 @@ Array [
"message": "Element references missing id \\"missing-text\\"",
"offset": 102,
"ruleId": "no-missing-references",
"selector": "div:nth-child(3)",
"severity": 2,
"size": 12,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Raw \\"&\\" must be encoded as \\"&amp;\\"",
"offset": 8,
"ruleId": "no-raw-characters",
"selector": "p",
"severity": 2,
"size": 1,
},
......@@ -25,6 +26,7 @@ Array [
"message": "Raw \\"'\\" must be encoded as \\"&apos;\\"",
"offset": 33,
"ruleId": "no-raw-characters",
"selector": "p:nth-child(2)",
"severity": 2,
"size": 1,
},
......@@ -48,6 +50,7 @@ Array [
"message": "failed to tokenize \\"</p>\\", expected attribute, \\">\\" or \\"/>\\".",
"offset": 17,
"ruleId": "parser-error",
"selector": null,
"severity": 2,
"size": 0,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Use external stylesheet with <link> instead of <style> tag",
"offset": 0,
"ruleId": "no-style-tag",
"selector": "style",
"severity": 2,
"size": 6,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Unknown element <custom-element>",
"offset": 0,
"ruleId": "no-unknown-elements",
"selector": "custom-element",
"severity": 2,
"size": 15,
},
......
......@@ -15,6 +15,7 @@ Array [
"message": "Prefer to use <button> instead of <input type=\\"button\\"> when adding buttons",
"offset": 13,
"ruleId": "prefer-button",
"selector": "input",
"severity": 2,
"size": 6,
},