Skip to content

Commit

Permalink
final refactor to shuffle buckets
Browse files Browse the repository at this point in the history
  • Loading branch information
davemo committed May 10, 2021
1 parent 8fdea97 commit 1663bd1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 247 deletions.
2 changes: 1 addition & 1 deletion test/validator/index.ts
Expand Up @@ -2,7 +2,7 @@ import * as fs from 'fs';
import * as assert from 'assert';
import { svelte, loadConfig, tryToLoadJson } from '../helpers';

describe.only('validate', () => {
describe('validate', () => {
fs.readdirSync(`${__dirname}/samples`).forEach(dir => {
if (dir[0] === '.') return;

Expand Down
12 changes: 0 additions & 12 deletions test/validator/samples/a11y-aria-proptypes-global/input.svelte
@@ -1,21 +1,9 @@
<span aria-hidden="yes">foo</span>
<span aria-atomic="yes">foo</span>
<span aria-busy="yes">foo</span>
<span aria-controls>foo</span>
<span aria-current="some wrong values">foo</span>
<span aria-describedby>foo</span>
<span aria-details>foo</span>
<span aria-disabled="yes">foo</span>
<span aria-dropeffect="copy execute badvalue">foo</span>
<span aria-errormessage>foo</span>
<span aria-flowto>foo</span>
<span aria-grabbed="yes">foo</span>
<span aria-haspopup="listbox tree">foo</span>
<span aria-invalid="grammar spelling">foo</span>
<span aria-keyshortcuts>foo</span>
<span aria-label>foo</span>
<span aria-labelledby>foo</span>
<span aria-live="assertive polite">foo</span>
<span aria-owns>foo</span>
<span aria-relevant="additions removals badvalue">foo</span>
<span aria-roledescription>foo</span>
276 changes: 42 additions & 234 deletions test/validator/samples/a11y-aria-proptypes-global/warnings.json
Expand Up @@ -17,321 +17,129 @@

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-atomic' must be exactly one of true or false",
"start": {
"line": 2,
"column": 6,
"character": 41
},
"end": {
"line": 2,
"column": 23,
"character": 58
},
"pos": 41
},

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-busy' must be exactly one of true or false",
"start": {
"line": 3,
"column": 6,
"character": 76
},
"end": {
"line": 3,
"column": 21,
"character": 91
},
"pos": 76
},

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-controls' must be a space-separated list of strings that represent DOM element IDs",
"start": {
"line": 4,
"column": 6,
"character": 109
},
"end": {
"line": 4,
"column": 19,
"character": 122
},
"pos": 109
},

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-current' must be exactly one of page, step, location, date, time, true, false",
"start": {
"line": 5,
"column": 6,
"character": 140
},
"end": {
"line": 5,
"character": 73,
"column": 38,
"character": 172
"line": 2
},
"pos": 140
},

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-describedby' must be a space-separated list of strings that represent DOM element IDs",
"message": "A11y: The value for the aria attribute 'aria-current' must be exactly one of page, step, location, date, time, true, false",
"pos": 41,
"start": {
"line": 6,
"character": 41,
"column": 6,
"character": 190
},
"end": {
"line": 6,
"column": 22,
"character": 206
},
"pos": 190
"line": 2
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"message": "A11y: The value for the aria attribute 'aria-details' must be a string that represents a DOM element ID",
"start": {
"line": 7,
"line": 3,
"column": 6,
"character": 224
"character": 91
},
"end": {
"line": 7,
"line": 3,
"column": 18,
"character": 236
"character": 103
},
"pos": 224
"pos": 91
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 273,
"character": 140,
"column": 25,
"line": 8
"line": 4
},
"message": "A11y: The value for the aria attribute 'aria-disabled' must be exactly one of true or false",
"pos": 254,
"start": {
"character": 254,
"column": 6,
"line": 8
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 330,
"column": 45,
"line": 9
},
"message": "A11y: The value for the aria attribute 'aria-dropeffect' must be a space-separated list of one or more of copy, execute, link, move, none, popup",
"pos": 291,
"pos": 121,
"start": {
"character": 291,
"character": 121,
"column": 6,
"line": 9
"line": 4
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 365,
"column": 23,
"line": 10
},
"message": "A11y: The value for the aria attribute 'aria-errormessage' must be a string that represents a DOM element ID",
"pos": 348,
"start": {
"character": 348,
"column": 6,
"line": 10
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 394,
"column": 17,
"line": 11
},
"message": "A11y: The value for the aria attribute 'aria-flowto' must be a space-separated list of strings that represent DOM element IDs",
"pos": 383,
"start": {
"character": 383,
"column": 6,
"line": 11
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 430,
"column": 24,
"line": 12
},
"message": "A11y: The value for the aria attribute 'aria-grabbed' must be exactly one of true, false, or undefined",
"pos": 412,
"start": {
"character": 412,
"column": 6,
"line": 12
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 476,
"character": 186,
"column": 34,
"line": 13
"line": 5
},
"message": "A11y: The value for the aria attribute 'aria-haspopup' must be exactly one of false, true, menu, listbox, tree, grid, dialog",
"pos": 448,
"pos": 158,
"start": {
"character": 448,
"character": 158,
"column": 6,
"line": 13
"line": 5
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 525,
"character": 235,
"column": 37,
"line": 14
"line": 6
},
"message": "A11y: The value for the aria attribute 'aria-invalid' must be exactly one of grammar, false, spelling, true",
"pos": 494,
"pos": 204,
"start": {
"character": 494,
"character": 204,
"column": 6,
"line": 14
"line": 6
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 560,
"character": 270,
"column": 23,
"line": 15
"line": 7
},
"message": "A11y: The value for the aria attribute 'aria-keyshortcuts' must be of type string",
"pos": 543,
"pos": 253,
"start": {
"character": 543,
"character": 253,
"column": 6,
"line": 15
"line": 7
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 588,
"character": 298,
"column": 16,
"line": 16
"line": 8
},
"message": "A11y: The value for the aria attribute 'aria-label' must be of type string",
"pos": 578,
"start": {
"character": 578,
"column": 6,
"line": 16
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 621,
"column": 21,
"line": 17
},
"message": "A11y: The value for the aria attribute 'aria-labelledby' must be a space-separated list of strings that represent DOM element IDs",
"pos": 606,
"start": {
"character": 606,
"column": 6,
"line": 17
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 667,
"column": 34,
"line": 18
},
"message": "A11y: The value for the aria attribute 'aria-live' must be exactly one of assertive, off, polite",
"pos": 639,
"start": {
"character": 639,
"column": 6,
"line": 18
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 694,
"column": 15,
"line": 19
},
"message": "A11y: The value for the aria attribute 'aria-owns' must be a space-separated list of strings that represent DOM element IDs",
"pos": 685,
"start": {
"character": 685,
"column": 6,
"line": 19
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 755,
"column": 49,
"line": 20
},
"message": "A11y: The value for the aria attribute 'aria-relevant' must be a space-separated list of one or more of additions, all, removals, text",
"pos": 712,
"pos": 288,
"start": {
"character": 712,
"character": 288,
"column": 6,
"line": 20
"line": 8
}
},

{
"code": "a11y-invalid-aria-attribute-value",
"end": {
"character": 793,
"character": 336,
"column": 26,
"line": 21
"line": 9
},
"message": "A11y: The value for the aria attribute 'aria-roledescription' must be of type string",
"pos": 773,
"pos": 316,
"start": {
"character": 773,
"character": 316,
"column": 6,
"line": 21
"line": 9
}
}
]

0 comments on commit 1663bd1

Please sign in to comment.