diff --git a/__tests__/src/rules/role-supports-aria-props-test.js b/__tests__/src/rules/role-supports-aria-props-test.js index c1d5341ab..df2091d27 100644 --- a/__tests__/src/rules/role-supports-aria-props-test.js +++ b/__tests__/src/rules/role-supports-aria-props-test.js @@ -141,23 +141,8 @@ ruleTester.run('role-supports-aria-props', rule, { // this will have global { code: '' }, - // IMG TESTS - implicit role is `presentation` - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, - { code: '' }, + // IMG TESTS - no implicit role + { code: '' }, // this will have role of `img` { code: 'foobar' }, @@ -444,8 +429,8 @@ ruleTester.run('role-supports-aria-props', rule, { errors: [errorMessage('aria-checked', 'link', 'link', true)], }, { - code: '', - errors: [errorMessage('aria-checked', 'presentation', 'img', true)], + code: 'foobar', + errors: [errorMessage('aria-checked', 'img', 'img', true)], }, { code: '', diff --git a/src/util/implicitRoles/img.js b/src/util/implicitRoles/img.js index fc6cef9d8..a03217ffd 100644 --- a/src/util/implicitRoles/img.js +++ b/src/util/implicitRoles/img.js @@ -7,7 +7,7 @@ export default function getImplicitRoleForImg(attributes) { const alt = getProp(attributes, 'alt'); if (alt && getLiteralPropValue(alt) === '') { - return 'presentation'; + return ''; } return 'img';