diff --git a/lib/checks/shared/presentational-role-evaluate.js b/lib/checks/shared/presentational-role-evaluate.js index a32d32df07..750320dbab 100644 --- a/lib/checks/shared/presentational-role-evaluate.js +++ b/lib/checks/shared/presentational-role-evaluate.js @@ -3,9 +3,25 @@ import { getGlobalAriaAttrs } from '../../commons/standards'; import { isFocusable } from '../../commons/dom'; export default function presentationalRoleEvaluate(node, options, virtualNode) { - const role = getRole(virtualNode); const explicitRole = getExplicitRole(virtualNode); + // in JAWS, an iframe or frame with an accessible name and a presentational role gets announced + // as "group" rather than being ignored. aria-label is handled by role-conflict resolution and + // aria-labelledby only triggers the group role when it's valid (exists and has content) + if ( + ['presentation', 'none'].includes(explicitRole) && + ['iframe', 'frame'].includes(virtualNode.props.nodeName) && + virtualNode.hasAttr('title') + ) { + this.data({ + messageKey: 'iframe', + nodeName: virtualNode.props.nodeName + }); + return false; + } + + const role = getRole(virtualNode); + if (['presentation', 'none'].includes(role)) { this.data({ role }); return true; diff --git a/lib/checks/shared/presentational-role.json b/lib/checks/shared/presentational-role.json index a453bbd210..7b8dfb3b08 100644 --- a/lib/checks/shared/presentational-role.json +++ b/lib/checks/shared/presentational-role.json @@ -9,7 +9,8 @@ "default": "Element's default semantics were not overridden with role=\"none\" or role=\"presentation\"", "globalAria": "Element's role is not presentational because it has a global ARIA attribute", "focusable": "Element's role is not presentational because it is focusable", - "both": "Element's role is not presentational because it has a global ARIA attribute and is focusable" + "both": "Element's role is not presentational because it has a global ARIA attribute and is focusable", + "iframe": "Using the \"title\" attribute on an ${data.nodeName} element with a presentational role behaves inconsistently between screen readers" } } } diff --git a/test/act-mapping/frame-title.json b/test/act-mapping/frame-title.json new file mode 100644 index 0000000000..8c520bb5aa --- /dev/null +++ b/test/act-mapping/frame-title.json @@ -0,0 +1,5 @@ +{ + "id": "cae760", + "title": "Iframe element has non-empty accessible name", + "axeRules": ["frame-title"] +} diff --git a/test/checks/shared/presentational-role.js b/test/checks/shared/presentational-role.js index 9f93f2af68..f9f9cd9e32 100644 --- a/test/checks/shared/presentational-role.js +++ b/test/checks/shared/presentational-role.js @@ -1,4 +1,4 @@ -describe('presentational-role', function() { +describe('presentational-role', function () { 'use strict'; var fixture = document.getElementById('fixture'); @@ -6,38 +6,38 @@ describe('presentational-role', function() { var checkEvaluate = axe.testUtils.getCheckEvaluate('presentational-role'); var checkContext = axe.testUtils.MockCheckContext(); - afterEach(function() { + afterEach(function () { fixture.innerHTML = ''; checkContext.reset(); }); - it('should detect role="none" on the element', function() { + it('should detect role="none" on the element', function () { var vNode = queryFixture('
'); assert.isTrue(checkEvaluate.call(checkContext, null, null, vNode)); assert.deepEqual(checkContext._data.role, 'none'); }); - it('should detect role="presentation" on the element', function() { + it('should detect role="presentation" on the element', function () { var vNode = queryFixture(''); assert.isTrue(checkEvaluate.call(checkContext, null, null, vNode)); assert.deepEqual(checkContext._data.role, 'presentation'); }); - it('should return false when role !== none', function() { + it('should return false when role !== none', function () { var vNode = queryFixture('
'); assert.isFalse(checkEvaluate.call(checkContext, null, null, vNode)); }); - it('should return false when there is no role attribute', function() { + it('should return false when there is no role attribute', function () { var vNode = queryFixture('
'); assert.isFalse(checkEvaluate.call(checkContext, null, null, vNode)); }); - it('should return false when the element is focusable', function() { + it('should return false when the element is focusable', function () { var vNode = queryFixture( '' ); @@ -46,7 +46,7 @@ describe('presentational-role', function() { assert.deepEqual(checkContext._data.messageKey, 'focusable'); }); - it('should return false when the element has global aria attributes', function() { + it('should return false when the element has global aria attributes', function () { var vNode = queryFixture( '' ); @@ -55,7 +55,7 @@ describe('presentational-role', function() { assert.deepEqual(checkContext._data.messageKey, 'globalAria'); }); - it('should return false when the element has global aria attributes and is focusable', function() { + it('should return false when the element has global aria attributes and is focusable', function () { var vNode = queryFixture( '' ); @@ -63,4 +63,28 @@ describe('presentational-role', function() { assert.isFalse(checkEvaluate.call(checkContext, null, null, vNode)); assert.deepEqual(checkContext._data.messageKey, 'both'); }); + + it('should return false for iframe element with role=none and title', function () { + var vNode = queryFixture( + '' + ); + + assert.isFalse(checkEvaluate.call(checkContext, null, null, vNode)); + assert.deepEqual(checkContext._data, { + messageKey: 'iframe', + nodeName: 'iframe' + }); + }); + + it('should return false for iframe element with role=presentation and title', function () { + var vNode = queryFixture( + '' + ); + + assert.isFalse(checkEvaluate.call(checkContext, null, null, vNode)); + assert.deepEqual(checkContext._data, { + messageKey: 'iframe', + nodeName: 'iframe' + }); + }); }); diff --git a/test/commons/dom/is-focusable.js b/test/commons/dom/is-focusable.js index ee75953083..6787f68fe1 100644 --- a/test/commons/dom/is-focusable.js +++ b/test/commons/dom/is-focusable.js @@ -1,4 +1,4 @@ -describe('is-focusable', function() { +describe('is-focusable', function () { function hideByClipping(el) { el.style.cssText = 'position: absolute !important;' + @@ -19,16 +19,16 @@ describe('is-focusable', function() { var fixtureSetup = axe.testUtils.fixtureSetup; var flatTreeSetup = axe.testUtils.flatTreeSetup; - describe('dom.isFocusable', function() { + describe('dom.isFocusable', function () { 'use strict'; var fixture = document.getElementById('fixture'); - afterEach(function() { + afterEach(function () { document.getElementById('fixture').innerHTML = ''; }); - it('should return true for visible, enabled textareas', function() { + it('should return true for visible, enabled textareas', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -36,7 +36,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for visible, enabled selects', function() { + it('should return true for visible, enabled selects', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -44,7 +44,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for visible, enabled buttons', function() { + it('should return true for visible, enabled buttons', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -52,7 +52,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for visible, enabled, non-hidden inputs', function() { + it('should return true for visible, enabled, non-hidden inputs', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -60,7 +60,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return false for non-element nodes', function() { + it('should return false for non-element nodes', function () { fixture.innerHTML = 'Hello World'; flatTreeSetup(fixture); var el = document.getElementById('target').childNodes[0]; @@ -68,7 +68,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for disabled elements', function() { + it('should return false for disabled elements', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -76,7 +76,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for hidden inputs', function() { + it('should return false for hidden inputs', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -84,7 +84,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for hidden inputs with tabindex', function() { + it('should return false for hidden inputs with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -92,7 +92,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for hidden buttons with tabindex', function() { + it('should return false for hidden buttons with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -101,7 +101,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for disabled buttons with tabindex', function() { + it('should return false for disabled buttons with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -109,7 +109,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for non-visible elements', function() { + it('should return false for non-visible elements', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -118,7 +118,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return true for an anchor with an href', function() { + it('should return true for an anchor with an href', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -126,7 +126,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return false for an anchor with no href', function() { + it('should return false for an anchor with no href', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -134,7 +134,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return true for a div with a tabindex with spaces', function() { + it('should return true for a div with a tabindex with spaces', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -142,7 +142,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for a div with a tabindex', function() { + it('should return true for a div with a tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -150,7 +150,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return false for a div with a non-numeric tabindex', function() { + it('should return false for a div with a non-numeric tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -158,7 +158,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return true for a summary element', function() { + it('should return true for a summary element', function () { fixture.innerHTML = '
Summary

Detail

'; var el = document.getElementById('target'); @@ -167,7 +167,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for a details element without a summary element', function() { + it('should return true for a details element without a summary element', function () { fixture.innerHTML = '

Detail

'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -175,7 +175,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return false for a details element with a summary element', function() { + it('should return false for a details element with a summary element', function () { fixture.innerHTML = '
Summary

Detail

'; var el = document.getElementById('target'); @@ -184,7 +184,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for a div with no tabindex', function() { + it('should return false for a div with no tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -193,16 +193,16 @@ describe('is-focusable', function() { }); }); - describe('dom.isNativelyFocusable', function() { + describe('dom.isNativelyFocusable', function () { 'use strict'; var fixture = document.getElementById('fixture'); - afterEach(function() { + afterEach(function () { document.getElementById('fixture').innerHTML = ''; }); - it('should return true for buttons with redundant tabindex', function() { + it('should return true for buttons with redundant tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -210,7 +210,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for buttons with tabindex -1', function() { + it('should return true for buttons with tabindex -1', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -218,7 +218,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for visible, enabled textareas', function() { + it('should return true for visible, enabled textareas', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -226,7 +226,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for visible, enabled selects', function() { + it('should return true for visible, enabled selects', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -234,7 +234,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for visible, enabled buttons', function() { + it('should return true for visible, enabled buttons', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -242,7 +242,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for visible, enabled, non-hidden inputs', function() { + it('should return true for visible, enabled, non-hidden inputs', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -250,7 +250,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for disabled elements', function() { + it('should return false for disabled elements', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -258,7 +258,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for hidden inputs', function() { + it('should return false for hidden inputs', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -266,7 +266,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements hidden with display:none', function() { + it('should return false for elements hidden with display:none', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -275,7 +275,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements hidden with visibility:hidden', function() { + it('should return false for elements hidden with visibility:hidden', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -284,7 +284,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements collapsed with visibility:collapse', function() { + it('should return false for elements collapsed with visibility:collapse', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -293,7 +293,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for clipped elements', function() { + it('should return true for clipped elements', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); hideByClipping(el); @@ -302,7 +302,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for elements positioned off screen', function() { + it('should return true for elements positioned off screen', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); hideByMovingOffScreen(el); @@ -311,7 +311,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements hidden with display:none on an ancestor', function() { + it('should return false for elements hidden with display:none on an ancestor', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -320,7 +320,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements hidden with visibility:hidden on an ancestor', function() { + it('should return false for elements hidden with visibility:hidden on an ancestor', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -329,7 +329,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for elements collapsed with visibility:collapse on an ancestor', function() { + it('should return false for elements collapsed with visibility:collapse on an ancestor', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); @@ -338,7 +338,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for elements with a clipped ancestor', function() { + it('should return true for elements with a clipped ancestor', function () { fixture.innerHTML = '
'; hideByClipping(document.getElementById('parent')); @@ -348,7 +348,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for elements off-screened by an ancestor', function() { + it('should return true for elements off-screened by an ancestor', function () { fixture.innerHTML = '
'; hideByMovingOffScreen(document.getElementById('parent')); @@ -358,7 +358,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for hidden inputs with tabindex', function() { + it('should return false for hidden inputs with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -366,7 +366,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for disabled inputs with tabindex', function() { + it('should return false for disabled inputs with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -374,7 +374,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for hidden buttons with tabindex', function() { + it('should return false for hidden buttons with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); @@ -383,7 +383,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for disabled buttons with tabindex', function() { + it('should return false for disabled buttons with tabindex', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -391,7 +391,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return true for an anchor with an href', function() { + it('should return true for an anchor with an href', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -399,7 +399,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for an anchor with no href', function() { + it('should return false for an anchor with no href', function () { fixture.innerHTML = ''; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -407,7 +407,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for a div with a tabindex with spaces', function() { + it('should return false for a div with a tabindex with spaces', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -415,7 +415,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for a div with a tabindex', function() { + it('should return false for a div with a tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -423,7 +423,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return false for a div with a non-numeric tabindex', function() { + it('should return false for a div with a non-numeric tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -431,7 +431,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isNativelyFocusable(el)); }); - it('should return true for a summary element', function() { + it('should return true for a summary element', function () { fixture.innerHTML = '
Summary

Detail

'; var el = document.getElementById('target'); @@ -440,7 +440,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return true for a details element without a summary element', function() { + it('should return true for a details element without a summary element', function () { fixture.innerHTML = '

Detail

'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -448,7 +448,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.isFocusable(el)); }); - it('should return false for a details element with a summary element', function() { + it('should return false for a details element with a summary element', function () { fixture.innerHTML = '
Summary

Detail

'; var el = document.getElementById('target'); @@ -457,7 +457,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.isFocusable(el)); }); - it('should return false for a div with no tabindex', function() { + it('should return false for a div with no tabindex', function () { fixture.innerHTML = '
'; var el = document.getElementById('target'); flatTreeSetup(fixture); @@ -466,21 +466,21 @@ describe('is-focusable', function() { }); }); - describe('dom.insertedIntoFocusOrder', function() { + describe('dom.insertedIntoFocusOrder', function () { var fixture = document.getElementById('fixture'); - beforeEach(function() { + beforeEach(function () { fixture.innerHTML = ''; }); - it('should return true for span with tabindex 0', function() { + it('should return true for span with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#spanTabindex0'); assert.isTrue(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return true for clipped span with tabindex 0', function() { + it('should return true for clipped span with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#clippedSpanTabindex0'); hideByClipping(node); @@ -488,7 +488,7 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return true for off screen span with tabindex 0', function() { + it('should return true for off screen span with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#offScreenSpanTabindex0'); hideByMovingOffScreen(node); @@ -496,28 +496,28 @@ describe('is-focusable', function() { assert.isTrue(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for span with negative tabindex', function() { + it('should return false for span with negative tabindex', function () { fixtureSetup(''); var node = fixture.querySelector('#spanNegativeTabindex'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for native button with tabindex 0', function() { + it('should return false for native button with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#nativeButtonTabindex0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for native button with tabindex implicitly 0', function() { + it('should return false for native button with tabindex implicitly 0', function () { fixtureSetup(''); var node = fixture.querySelector('#nativeButtonTabindexImplicitly0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for anchor with href and positive tabindex', function() { + it('should return false for anchor with href and positive tabindex', function () { fixtureSetup( '' ); @@ -526,14 +526,14 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for input with tabindex 0', function() { + it('should return false for input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#inputWithTabindex0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for off screen native button with tabindex 0', function() { + it('should return false for off screen native button with tabindex 0', function () { fixtureSetup( '' ); @@ -543,7 +543,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for off screen anchor with href and tabindex 1', function() { + it('should return false for off screen anchor with href and tabindex 1', function () { fixtureSetup( '' ); @@ -553,7 +553,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for off screen input with tabindex 0', function() { + it('should return false for off screen input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#offScreenInputWithTabindex0'); hideByMovingOffScreen(node); @@ -561,7 +561,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for clipped native button with tabindex 0', function() { + it('should return false for clipped native button with tabindex 0', function () { fixtureSetup( '' ); @@ -571,7 +571,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for display none native button with tabindex 0', function() { + it('should return false for display none native button with tabindex 0', function () { fixtureSetup( '' ); @@ -580,7 +580,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for clipped anchor with href and tabindex 1', function() { + it('should return false for clipped anchor with href and tabindex 1', function () { fixtureSetup( '' ); @@ -590,7 +590,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for display none anchor with href and tabindex 1', function() { + it('should return false for display none anchor with href and tabindex 1', function () { fixtureSetup( '' ); @@ -599,7 +599,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for clipped input with tabindex 0', function() { + it('should return false for clipped input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#clippedInputWithTabindex0'); hideByClipping(node); @@ -607,14 +607,14 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for display none input with tabindex 0', function() { + it('should return false for display none input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#displayNoneInputWithTabindex0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for hidden native button with tabindex 0', function() { + it('should return false for hidden native button with tabindex 0', function () { fixtureSetup( '' ); @@ -623,7 +623,7 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for hidden anchor with href and tabindex 1', function() { + it('should return false for hidden anchor with href and tabindex 1', function () { fixtureSetup( '' ); @@ -632,14 +632,14 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for hidden input with tabindex 0', function() { + it('should return false for hidden input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#hiddenInputWithTabindex0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for disabled native button with tabindex 0', function() { + it('should return false for disabled native button with tabindex 0', function () { fixtureSetup( '' ); @@ -648,14 +648,14 @@ describe('is-focusable', function() { assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for disabled input with tabindex 0', function() { + it('should return false for disabled input with tabindex 0', function () { fixtureSetup(''); var node = fixture.querySelector('#disabledInputTabindex0'); assert.isFalse(axe.commons.dom.insertedIntoFocusOrder(node)); }); - it('should return false for an invalid tabindex', function() { + it('should return false for an invalid tabindex', function () { fixtureSetup(''); var node = fixture.querySelector('#spanTabindexInvalid'); diff --git a/test/integration/rules/frame-title/frame-title.html b/test/integration/rules/frame-title/frame-title.html index 8b8340aeb4..fec81a2676 100644 --- a/test/integration/rules/frame-title/frame-title.html +++ b/test/integration/rules/frame-title/frame-title.html @@ -64,6 +64,18 @@ role="presentation" tabindex="0" > + +