Skip to content

Commit 8059f51

Browse files
committed
Fix test failures raised by the upgrade to ARIA 1.2
1 parent b1f412a commit 8059f51

10 files changed

+2
-17
lines changed

__tests__/src/rules/alt-text-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const array = [{
5050
'input[type="image"]': ['InputImage'],
5151
}];
5252

53-
5453
ruleTester.run('alt-text', rule, {
5554
valid: [
5655
// DEFAULT ELEMENT 'img' TESTS

__tests__/src/rules/label-has-for-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ const expectedEveryError = {
3434
type: 'JSXOpeningElement',
3535
};
3636

37-
3837
const optionsComponents = [{
3938
components: ['Label', 'Descriptor'],
4039
}];

__tests__/src/rules/no-onchange-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* @author Ethan Cohen
55
*/
66

7-
87
// -----------------------------------------------------------------------------
98
// Requirements
109
// -----------------------------------------------------------------------------

__tests__/src/rules/role-has-required-aria-props-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ const errorMessage = (role) => {
2929
};
3030
};
3131

32-
3332
// Create basic test cases using all valid role types.
3433
const basicValidityTests = [...roles.keys()].map((role) => {
3534
const {

__tests__/src/rules/role-supports-aria-props-test.js

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,7 @@ ruleTester.run('role-supports-aria-props', rule, {
297297
// when `type="checkbox"`, the implicit role is `checkbox`
298298
{ code: '<input type="checkbox" aria-atomic />' },
299299
{ code: '<input type="checkbox" aria-busy />' },
300+
{ code: '<input type="checkbox" aria-checked />' },
300301
{ code: '<input type="checkbox" aria-controls />' },
301302
{ code: '<input type="checkbox" aria-describedby />' },
302303
{ code: '<input type="checkbox" aria-disabled />' },
@@ -313,6 +314,7 @@ ruleTester.run('role-supports-aria-props', rule, {
313314
// when `type="radio"`, the implicit role is `radio`
314315
{ code: '<input type="radio" aria-atomic />' },
315316
{ code: '<input type="radio" aria-busy />' },
317+
{ code: '<input type="radio" aria-checked />' },
316318
{ code: '<input type="radio" aria-controls />' },
317319
{ code: '<input type="radio" aria-describedby />' },
318320
{ code: '<input type="radio" aria-disabled />' },
@@ -476,10 +478,6 @@ ruleTester.run('role-supports-aria-props', rule, {
476478
code: '<input type="radio" aria-selected />',
477479
errors: [errorMessage('aria-selected', 'radio', 'input', true)],
478480
},
479-
{
480-
code: '<input type="radio" aria-checked />',
481-
errors: [errorMessage('aria-checked', 'radio', 'input', true)],
482-
},
483481
{
484482
code: '<input type="radio" aria-haspopup />',
485483
errors: [errorMessage('aria-haspopup', 'radio', 'input', true)],
@@ -488,10 +486,6 @@ ruleTester.run('role-supports-aria-props', rule, {
488486
code: '<input type="checkbox" aria-haspopup />',
489487
errors: [errorMessage('aria-haspopup', 'checkbox', 'input', true)],
490488
},
491-
{
492-
code: '<input type="checkbox" aria-checked />',
493-
errors: [errorMessage('aria-checked', 'checkbox', 'input', true)],
494-
},
495489
{
496490
code: '<input type="reset" aria-invalid />',
497491
errors: [errorMessage('aria-invalid', 'button', 'input', true)],

__tests__/src/util/hasAccessibleChild-test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ describe('hasAccessibleChild', () => {
1111
});
1212
});
1313

14-
1514
describe('has no children and sets dangerouslySetInnerHTML', () => {
1615
it('Returns true', () => {
1716
const prop = JSXAttributeMock('dangerouslySetInnerHTML', true);

src/rules/alt-text.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,6 @@ module.exports = {
218218
return type;
219219
}));
220220

221-
222221
return {
223222
JSXOpeningElement: (node) => {
224223
const nodeType = elementType(node);

src/rules/anchor-has-content.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import { elementType } from 'jsx-ast-utils';
1111
import { arraySchema, generateObjSchema } from '../util/schemas';
1212
import hasAccessibleChild from '../util/hasAccessibleChild';
1313

14-
1514
const errorMessage = 'Anchors must have content and the content must be accessible by a screen reader.';
1615

1716
const schema = generateObjSchema({ components: arraySchema });

src/rules/no-distracting-elements.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ const errorMessage = (element) => (
1414
`Do not use <${element}> elements as they can create visual accessibility issues and are deprecated.`
1515
);
1616

17-
1817
const DEFAULT_ELEMENTS = [
1918
'marquee',
2019
'blink',

src/rules/no-noninteractive-tabindex.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ module.exports = {
5858
}
5959
const role = getLiteralPropValue(getProp(node.attributes, 'role'));
6060

61-
6261
if (!dom.has(type)) {
6362
// Do not test higher level JSX components, as we do not know what
6463
// low-level DOM element this maps to.

0 commit comments

Comments
 (0)