Commit 26f50745 authored by David Sveningsson's avatar David Sveningsson

fix(rules): change output format of wcag/h37 and element-required-attributes to match

[skip release]
parent 8916e19e
Pipeline #76872159 passed with stages
in 10 minutes and 21 seconds
......@@ -10,7 +10,7 @@ Array [
"column": 2,
"context": undefined,
"line": 1,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 1,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -23,7 +23,7 @@ Array [
"element": "button",
},
"line": 2,
"message": "<button> is missing required attribute \\"type\\"",
"message": "<button> is missing required \\"type\\" attribute",
"offset": 22,
"ruleId": "element-required-attributes",
"severity": 2,
......
......@@ -15,7 +15,7 @@ Array [
"element": "input",
},
"line": 1,
"message": "<input> is missing required attribute \\"type\\"",
"message": "<input> is missing required \\"type\\" attribute",
"offset": 1,
"ruleId": "element-required-attributes",
"severity": 2,
......
......@@ -16,7 +16,7 @@ Array [
"column": 2,
"context": undefined,
"line": 1,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 1,
"ruleId": "WCAG/H37",
"severity": 2,
......
......@@ -882,7 +882,7 @@ Array [
"element": "button",
},
"line": 15,
"message": "<button> is missing required attribute \\"type\\"",
"message": "<button> is missing required \\"type\\" attribute",
"offset": 453,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -1801,7 +1801,7 @@ Array [
"element": "frame",
},
"line": 6,
"message": "<frame> is missing required attribute \\"title\\"",
"message": "<frame> is missing required \\"title\\" attribute",
"offset": 153,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -2391,7 +2391,7 @@ Array [
"element": "html",
},
"line": 2,
"message": "<html> is missing required attribute \\"lang\\"",
"message": "<html> is missing required \\"lang\\" attribute",
"offset": 30,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -2497,7 +2497,7 @@ Array [
"element": "iframe",
},
"line": 2,
"message": "<iframe> is missing required attribute \\"title\\"",
"message": "<iframe> is missing required \\"title\\" attribute",
"offset": 41,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -2527,7 +2527,7 @@ Array [
"element": "img",
},
"line": 2,
"message": "<img> is missing required attribute \\"src\\"",
"message": "<img> is missing required \\"src\\" attribute",
"offset": 34,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -2801,7 +2801,7 @@ Array [
"element": "input",
},
"line": 17,
"message": "<input> is missing required attribute \\"type\\"",
"message": "<input> is missing required \\"type\\" attribute",
"offset": 507,
"ruleId": "element-required-attributes",
"severity": 2,
......@@ -5109,7 +5109,7 @@ Array [
"element": "th",
},
"line": 24,
"message": "<th> is missing required attribute \\"scope\\"",
"message": "<th> is missing required \\"scope\\" attribute",
"offset": 400,
"ruleId": "element-required-attributes",
"severity": 2,
......
......@@ -27,7 +27,7 @@ Array [
"element": "input",
},
"line": 1,
"message": "<input> is missing required attribute \\"type\\"",
"message": "<input> is missing required \\"type\\" attribute",
"offset": 1,
"ruleId": "element-required-attributes",
"severity": 2,
......
......@@ -15,7 +15,7 @@ describe("rule element-required-attributes", () => {
expect(report).toBeInvalid();
expect(report).toHaveError(
"element-required-attributes",
'<input> is missing required attribute "type"'
'<input> is missing required "type" attribute'
);
});
......
......@@ -36,7 +36,7 @@ class ElementRequiredAttributes extends Rule<Context> {
this.report(
node,
`<${node.tagName}> is missing required attribute "${key}"`,
`<${node.tagName}> is missing required "${key}" attribute`,
node.location,
context
);
......
......@@ -17,7 +17,7 @@ Array [
"column": 2,
"context": undefined,
"line": 4,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 55,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -49,7 +49,7 @@ Array [
"column": 2,
"context": undefined,
"line": 4,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 55,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -81,7 +81,7 @@ Array [
"column": 2,
"context": undefined,
"line": 2,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 16,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -91,7 +91,7 @@ Array [
"column": 2,
"context": undefined,
"line": 3,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 29,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -101,7 +101,7 @@ Array [
"column": 2,
"context": undefined,
"line": 4,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 55,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -133,7 +133,7 @@ Array [
"column": 2,
"context": undefined,
"line": 3,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 29,
"ruleId": "WCAG/H37",
"severity": 2,
......@@ -143,7 +143,7 @@ Array [
"column": 2,
"context": undefined,
"line": 4,
"message": "<img> is missing required alt attribute",
"message": "<img> is missing required \\"alt\\" attribute",
"offset": 55,
"ruleId": "WCAG/H37",
"severity": 2,
......
......@@ -33,7 +33,7 @@ describe("rule h37", () => {
expect(report).toBeInvalid();
expect(report).toHaveError(
"WCAG/H37",
"<img> is missing required alt attribute"
'<img> is missing required "alt" attribute'
);
});
......@@ -62,7 +62,7 @@ describe("rule h37", () => {
expect(report).toBeInvalid();
expect(report).toHaveError(
"WCAG/H37",
"<img> is missing required alt attribute"
'<img> is missing required "alt" attribute'
);
});
......@@ -71,7 +71,7 @@ describe("rule h37", () => {
expect(report).toBeInvalid();
expect(report).toHaveError(
"WCAG/H37",
"<img> is missing required alt attribute"
'<img> is missing required "alt" attribute'
);
});
......@@ -100,7 +100,7 @@ describe("rule h37", () => {
expect(report).toBeInvalid();
expect(report).toHaveError(
"WCAG/H37",
"<img> is missing required alt attribute"
'<img> is missing required "alt" attribute'
);
});
......
......@@ -55,7 +55,7 @@ class H37 extends Rule {
this.report(
node,
"<img> is missing required alt attribute",
'<img> is missing required "alt" attribute',
node.location
);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment