diff --git a/.circleci/config.yml b/.circleci/config.yml index 450be0423c..97b9287475 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,18 +52,6 @@ jobs: key: v9-cache-unix-{{ checksum "package-lock.json" }} paths: - node_modules - dependencies_win: - <<: *defaults - <<: *win_box - steps: - - checkout - - <<: *set_npm_auth - - <<: *restore_dependency_cache_win - - run: npm ci - - save_cache: - key: v9-cache-win-{{ checksum "package-lock.json" }} - paths: - - node_modules # Run ESLINT lint: @@ -88,23 +76,6 @@ jobs: - run: npm run test:integration:chrome - run: npm run test:integration:firefox - # Run the test suite in IE in windows - test_win: - <<: *defaults - <<: *win_box - steps: - - checkout - # npm i or restore cache - - <<: *restore_dependency_cache_win - - run: npm run build - - run: npm run test -- --browsers IE - # install selenium - - run: | - choco install selenium-ie-driver --version 3.141.5 - export PATH=/c/tools/selenium:$PATH - echo $PATH - - run: npm run test:integration:ie - # Run examples under `doc/examples` test_examples: <<: *defaults @@ -312,7 +283,6 @@ workflows: jobs: # install deps - dependencies_unix - - dependencies_win # Run linting - lint: requires: @@ -321,10 +291,6 @@ workflows: - test_unix: requires: - lint - # Run IE/ Windows test on all commits - - test_win: - requires: - - dependencies_win - test_examples: requires: - test_unix @@ -354,7 +320,6 @@ workflows: type: approval requires: - test_unix - - test_win - test_examples - test_locales - test_virtual_rules diff --git a/README.md b/README.md index e84eab2130..f63f8e3946 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ The [axe-core API](doc/API.md) fully supports the following browsers: - Google Chrome v42 and above - Mozilla Firefox v38 and above - Apple Safari v7 and above -- Internet Explorer v11 +- Internet Explorer v11 (DEPRECATED) -Support means that we will fix bugs and attempt to test each browser regularly. Only Firefox, Chrome, and Internet Explorer 11 are currently tested on every pull request. +Support means that we will fix bugs and attempt to test each browser regularly. Only Chrome and Firefox are currently tested on every pull request. There is limited support for JSDOM. We will attempt to make all rules compatible with JSDOM but where this is not possible, we recommend turning those rules off. Currently the `color-contrast` rule is known not to work with JSDOM. @@ -127,8 +127,7 @@ axe.configure({ }, 'aria-errormessage': { // Note: doT (https://github.com/olado/dot) templates are supported here. - fail: - 'Der Wert der aria-errormessage ${data.values}` muss eine Technik verwenden, um die Message anzukündigen (z. B., aria-live, aria-describedby, role=alert, etc.).' + fail: 'Der Wert der aria-errormessage ${data.values}` muss eine Technik verwenden, um die Message anzukündigen (z. B., aria-live, aria-describedby, role=alert, etc.).' } // ... } diff --git a/package.json b/package.json index 648a39a428..6d9f0dc18f 100644 --- a/package.json +++ b/package.json @@ -86,11 +86,9 @@ "integration:apg": "mocha test/aria-practices/*.spec.js", "integration:chrome": "npm run integration -- browser=Chrome", "integration:firefox": "npm run integration -- browser=Firefox", - "integration:ie": "npm run integration -- browser=\"Internet Explorer\"", "test:integration": "npm run test:integration:chrome", "test:integration:chrome": "start-server-and-test 9876 integration:chrome", "test:integration:firefox": "start-server-and-test 9876 integration:firefox", - "test:integration:ie": "start-server-and-test 9876 integration:ie", "test:examples": "node ./doc/examples/test-examples", "test:act": "karma start test/act-mapping/karma.config.js", "test:act:debug": "npm run test:act -- --no-single-run --browsers=Chrome", diff --git a/test/checks/color/color-contrast.js b/test/checks/color/color-contrast.js index c165796f57..20d0ad9c15 100644 --- a/test/checks/color/color-contrast.js +++ b/test/checks/color/color-contrast.js @@ -1,4 +1,4 @@ -describe('color-contrast', function() { +describe('color-contrast', function () { 'use strict'; var fixture = document.getElementById('fixture'); @@ -6,17 +6,16 @@ describe('color-contrast', function() { var checkSetup = axe.testUtils.checkSetup; var shadowSupported = axe.testUtils.shadowSupport.v1; var shadowCheckSetup = axe.testUtils.shadowCheckSetup; - var isIE11 = axe.testUtils.isIE11; var checkContext = axe.testUtils.MockCheckContext(); var contrastEvaluate = axe.testUtils.getCheckEvaluate('color-contrast'); - afterEach(function() { + afterEach(function () { fixture.innerHTML = ''; checkContext.reset(); axe._tree = undefined; }); - it('should return true for hidden element', function() { + it('should return true for hidden element', function () { var params = checkSetup( '
' + 'My text
' @@ -26,7 +25,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true for child of hidden element', function() { + it('should return true for child of hidden element', function () { var params = checkSetup( '
' + 'My text
' @@ -36,7 +35,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return the proper values stored in data', function() { + it('should return the proper values stored in data', function () { var params = checkSetup( '
' + 'My text
' @@ -53,7 +52,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true when there is sufficient contrast because of bold tag', function() { + it('should return true when there is sufficient contrast because of bold tag', function () { var params = checkSetup( '
' + 'My text
' @@ -63,7 +62,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true when there is sufficient contrast because of font weight', function() { + it('should return true when there is sufficient contrast because of font weight', function () { var params = checkSetup( '
' + 'My text
' @@ -73,7 +72,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return false when there is not sufficient contrast because of font weight', function() { + it('should return false when there is not sufficient contrast because of font weight', function () { var params = checkSetup( '
' + 'My text
' @@ -83,7 +82,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, [params[0]]); }); - it('should return true when there is sufficient contrast because of font size', function() { + it('should return true when there is sufficient contrast because of font size', function () { var params = checkSetup( '
' + 'My text
' @@ -92,7 +91,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return false when there is not sufficient contrast because of font size', function() { + it('should return false when there is not sufficient contrast because of font size', function () { var params = checkSetup( '
' + 'My text
' @@ -102,7 +101,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, [params[0]]); }); - it('should return true when there is sufficient contrast with explicit transparency', function() { + it('should return true when there is sufficient contrast with explicit transparency', function () { var params = checkSetup( '
' + 'My text
' @@ -112,7 +111,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true when there is sufficient contrast with implicit transparency', function() { + it('should return true when there is sufficient contrast with implicit transparency', function () { var params = checkSetup( '
' + 'My text
' @@ -122,7 +121,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true when there is sufficient contrast', function() { + it('should return true when there is sufficient contrast', function () { var params = checkSetup( '
' + 'My text
' @@ -132,7 +131,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true for inline elements with sufficient contrast spanning multiple lines', function() { + it('should return true for inline elements with sufficient contrast spanning multiple lines', function () { var params = checkSetup( '

Text oh heyyyy and here\'s
a link

' ); @@ -140,7 +139,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return undefined for inline elements spanning multiple lines that are overlapped', function() { + it('should return undefined for inline elements spanning multiple lines that are overlapped', function () { var params = checkSetup( '
' + '

Text oh heyyyy and here\'s
a link

' @@ -149,7 +148,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true for truncated inline elements', function() { + it('should return true for truncated inline elements', function () { var params = checkSetup( '

Text oh heyyyy Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed et sollicitudin quam. Fusce mi odio, egestas pulvinar erat eget, vehicula tempus est. Proin vitae ullamcorper velit. Donec sagittis est justo, mattis iaculis arcu facilisis id. Proin pulvinar ornare arcu a fermentum. Quisque et dignissim nulla, sit amet consectetur ipsum. Donec in libero porttitor, dapibus neque imperdiet, aliquam est. Vivamus blandit volutpat fringilla. In mi magna, mollis sit amet imperdiet eu, rutrum ut tellus. Mauris vel condimentum nibh, quis ultricies nisi. Vivamus accumsan quam mauris, id iaculis quam fringilla ac. Curabitur pulvinar dolor ac magna vehicula, non auctor ligula dignissim. Nam ac nibh porttitor, malesuada tortor varius, feugiat turpis. Mauris dapibus, tellus ut viverra porta, ipsum turpis bibendum ligula, at tempor felis ante non libero. Donec dapibus, diam sit amet posuere commodo, magna orci hendrerit ipsum, eu egestas mauris nulla ut ipsum. Sed luctus, orci in fringilla finibus, odio leo porta dolor, eu dignissim risus eros eget erat

' ); @@ -157,7 +156,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true for inline elements with sufficient contrast', function() { + it('should return true for inline elements with sufficient contrast', function () { var params = checkSetup( '

Text oh heyyyy and here\'s bold text

' ); @@ -165,7 +164,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return false when there is not sufficient contrast between foreground and background', function() { + it('should return false when there is not sufficient contrast between foreground and background', function () { var params = checkSetup( '
' + 'My text
' @@ -176,7 +175,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._data.messageKey, null); }); - it('should ignore position:fixed elements above the target', function() { + it('should ignore position:fixed elements above the target', function () { var params = checkSetup( '
' + '
header
' + @@ -190,7 +189,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, [expectedRelatedNodes]); }); - it('should ignore position:fixed elements directly above the target', function() { + it('should ignore position:fixed elements directly above the target', function () { var params = checkSetup( '
' + '
header
' + @@ -204,7 +203,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, [expectedRelatedNodes]); }); - it('should find contrast issues on position:fixed elements', function() { + it('should find contrast issues on position:fixed elements', function () { var params = checkSetup( '
' + '
header
' + @@ -217,7 +216,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, [params[0]]); }); - it('should return undefined for background-image elements', function() { + it('should return undefined for background-image elements', function () { var dataURI = 'data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/' + 'XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkA' + @@ -238,7 +237,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'bgImage'); }); - it('should return undefined for background-gradient elements', function() { + it('should return undefined for background-gradient elements', function () { var params = checkSetup( '
' + '

Text 2

' + @@ -251,9 +250,9 @@ describe('color-contrast', function() { assert.equal(checkContext._data.contrastRatio, 0); }); - it('should return undefined when there are elements overlapping', function(done) { + it('should return undefined when there are elements overlapping', function (done) { // Give Edge time to scroll... :/ - setTimeout(function() { + setTimeout(function () { var params = checkSetup( '
' + 'My text
' @@ -267,14 +266,14 @@ describe('color-contrast', function() { }, 10); }); - it('should return true when a form wraps mixed content', function() { + it('should return true when a form wraps mixed content', function () { var params = checkSetup( '

Some text

' ); assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should return true when a label wraps a text input', function() { + it('should return true when a label wraps a text input', function () { fixtureSetup(''); var target = fixture.querySelector('#target'); var virtualNode = axe.utils.getNodeFromTree(target); @@ -282,7 +281,7 @@ describe('color-contrast', function() { assert.isTrue(result); }); - it("should return true when a label wraps a text input but doesn't overlap", function() { + it("should return true when a label wraps a text input but doesn't overlap", function () { var params = checkSetup( '' @@ -291,7 +290,7 @@ describe('color-contrast', function() { assert.isTrue(result); }); - it('should return true when there is sufficient contrast based on thead', function() { + it('should return true when there is sufficient contrast based on thead', function () { var params = checkSetup( '
Col 1
' ); @@ -299,7 +298,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return true when there is sufficient contrast based on tbody', function() { + it('should return true when there is sufficient contrast based on tbody', function () { var params = checkSetup( '
Col 1
' ); @@ -307,9 +306,9 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should return undefined if element overlaps text content', function(done) { + it('should return undefined if element overlaps text content', function (done) { // Give Edge time to scroll - setTimeout(function() { + setTimeout(function () { var params = checkSetup( '
' + '
Hi
' + @@ -324,7 +323,7 @@ describe('color-contrast', function() { }, 10); }); - it('should return undefined if element has same color as background', function() { + it('should return undefined if element has same color as background', function () { var params = checkSetup( '
' + '
Text
' + @@ -336,7 +335,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.contrastRatio, 1); }); - it('returns relatedNodes with undefined', function() { + it('returns relatedNodes with undefined', function () { var dataURI = 'data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/' + 'XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkA' + @@ -358,7 +357,7 @@ describe('color-contrast', function() { ); }); - it('should not error if client rects do not fill entire bounding rect', function() { + it('should not error if client rects do not fill entire bounding rect', function () { var params = checkSetup( '
' +
         '\nx x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x x ' +
@@ -395,13 +394,13 @@ describe('color-contrast', function() {
         '\nx' +
         '\n
' ); - assert.doesNotThrow(function() { + assert.doesNotThrow(function () { contrastEvaluate.apply(checkContext, params); }); }); - describe('with pseudo elements', function() { - it('should return undefined if :before pseudo element has a background color', function() { + describe('with pseudo elements', function () { + it('should return undefined if :before pseudo element has a background color', function () { var params = checkSetup( '' + '

Content

' @@ -420,7 +419,7 @@ describe('color-contrast', function() { ); }); - it('should return undefined if :after pseudo element has a background color', function() { + it('should return undefined if :after pseudo element has a background color', function () { var params = checkSetup( '' + '

Content

' @@ -439,7 +438,7 @@ describe('color-contrast', function() { ); }); - it('should return undefined if pseudo element has a background image', function() { + it('should return undefined if pseudo element has a background image', function () { var dataURI = 'data:image/gif;base64,R0lGODlhEAAQAMQAAORHHOVSKudfOulrSOp3WOyDZu6QdvCchPGolfO0o/' + 'XBs/fNwfjZ0frl3/zy7////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAkA' + @@ -466,7 +465,7 @@ describe('color-contrast', function() { ); }); - it('should not return undefined if pseudo element has no content', function() { + it('should not return undefined if pseudo element has no content', function () { var params = checkSetup( '' + '

Content

' @@ -475,7 +474,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should not return undefined if pseudo element is not absolutely positioned no content', function() { + it('should not return undefined if pseudo element is not absolutely positioned no content', function () { var params = checkSetup( '' + '

Content

' @@ -484,7 +483,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should not return undefined if pseudo element is has zero dimension', function() { + it('should not return undefined if pseudo element is has zero dimension', function () { var params = checkSetup( '' + '

Content

' @@ -493,7 +492,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it("should not return undefined if pseudo element doesn't have a background", function() { + it("should not return undefined if pseudo element doesn't have a background", function () { var params = checkSetup( '' + '

Content

' @@ -502,7 +501,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should not return undefined if pseudo element has visibility: hidden', function() { + it('should not return undefined if pseudo element has visibility: hidden', function () { var params = checkSetup( '' + '

Content

' @@ -511,7 +510,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should not return undefined if pseudo element has display: none', function() { + it('should not return undefined if pseudo element has display: none', function () { var params = checkSetup( '' + '

Content

' @@ -520,7 +519,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should return undefined if pseudo element is more than 25% of the element', function() { + it('should return undefined if pseudo element is more than 25% of the element', function () { var params = checkSetup( '' + @@ -529,7 +528,7 @@ describe('color-contrast', function() { assert.isUndefined(contrastEvaluate.apply(checkContext, params)); }); - it('should not return undefined if pseudo element is 25% of the element', function() { + it('should not return undefined if pseudo element is 25% of the element', function () { var params = checkSetup( '' + @@ -538,21 +537,18 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - (isIE11 ? it : xit)( - 'should return undefined if the unit is not in px', - function() { - var params = checkSetup( - '' + - '

Content

' - ); - assert.isUndefined(contrastEvaluate.apply(checkContext, params)); - } - ); + it('should return undefined if the unit is not in px', function () { + var params = checkSetup( + '' + + '

Content

' + ); + assert.isUndefined(contrastEvaluate.apply(checkContext, params)); + }); }); - describe('with special texts', function() { - it('should return undefined for a single character text with insufficient contrast', function() { + describe('with special texts', function () { + it('should return undefined for a single character text with insufficient contrast', function () { var params = checkSetup( '
' + '
X
' + @@ -564,7 +560,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'shortTextContent'); }); - it('should return true for a single character text with insufficient contrast', function() { + it('should return true for a single character text with insufficient contrast', function () { var params = checkSetup( '
' + '
X
' + @@ -576,7 +572,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'shortTextContent'); }); - it('should return undefined when the text only contains nonBmp unicode when the ignoreUnicode option is true', function() { + it('should return undefined when the text only contains nonBmp unicode when the ignoreUnicode option is true', function () { var params = checkSetup( '
' + '
₠ ₡ ₢ ₣
' + @@ -591,7 +587,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'nonBmp'); }); - it('should return true when the text only contains nonBmp unicode when the ignoreUnicode option is false, and there is sufficient contrast', function() { + it('should return true when the text only contains nonBmp unicode when the ignoreUnicode option is false, and there is sufficient contrast', function () { var params = checkSetup( '
' + '
' + @@ -605,7 +601,7 @@ describe('color-contrast', function() { assert.isTrue(actual); }); - it('should return undefined when the text only contains nonBmp unicode when the ignoreUnicode option is false and the ignoreLength option is default, and there is insufficient contrast', function() { + it('should return undefined when the text only contains nonBmp unicode when the ignoreUnicode option is false and the ignoreLength option is default, and there is insufficient contrast', function () { var params = checkSetup( '
' + '
' + @@ -620,7 +616,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'shortTextContent'); }); - it('should return false when the text only contains nonBmp unicode when the ignoreUnicode option is false and the ignoreLength option is true, and there is insufficient contrast', function() { + it('should return false when the text only contains nonBmp unicode when the ignoreUnicode option is false and the ignoreLength option is true, and there is insufficient contrast', function () { var params = checkSetup( '
' + '
' + @@ -636,8 +632,8 @@ describe('color-contrast', function() { }); }); - describe('options', function() { - it('should support options.boldValue', function() { + describe('options', function () { + it('should support options.boldValue', function () { var params = checkSetup( '
' + 'My text
', @@ -650,7 +646,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.boldTextPt', function() { + it('should support options.boldTextPt', function () { var params = checkSetup( '
' + 'My text
', @@ -663,7 +659,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.largeTextPt', function() { + it('should support options.largeTextPt', function () { var params = checkSetup( '
' + 'My text
', @@ -676,7 +672,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.normal.expected', function() { + it('should support options.contrastRatio.normal.expected', function () { var params = checkSetup( '
' + 'My text
', @@ -693,7 +689,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.normal.minThreshold', function() { + it('should support options.contrastRatio.normal.minThreshold', function () { var params = checkSetup( '
' + 'My text
', @@ -710,7 +706,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.normal.maxThreshold', function() { + it('should support options.contrastRatio.normal.maxThreshold', function () { var params = checkSetup( '
' + 'My text
', @@ -727,7 +723,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.large.expected', function() { + it('should support options.contrastRatio.large.expected', function () { var params = checkSetup( '
' + 'My text
', @@ -744,7 +740,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.large.minThreshold', function() { + it('should support options.contrastRatio.large.minThreshold', function () { var params = checkSetup( '
' + 'My text
', @@ -761,7 +757,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should support options.contrastRatio.large.maxThreshold', function() { + it('should support options.contrastRatio.large.maxThreshold', function () { var params = checkSetup( '
' + 'My text
', @@ -778,7 +774,7 @@ describe('color-contrast', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - it('should ignore pseudo element with options.ignorePseudo', function() { + it('should ignore pseudo element with options.ignorePseudo', function () { var params = checkSetup( '' + '

Content

', @@ -790,7 +786,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('should adjust the pseudo element minimum size with the options.pseudoSizeThreshold', function() { + it('should adjust the pseudo element minimum size with the options.pseudoSizeThreshold', function () { var params = checkSetup( '' + @@ -805,7 +801,7 @@ describe('color-contrast', function() { (shadowSupported ? it : xit)( 'returns colors across Shadow DOM boundaries', - function() { + function () { var params = shadowCheckSetup( '
', '

Text

' @@ -817,8 +813,8 @@ describe('color-contrast', function() { } ); - describe('with text-shadow', function() { - it('passes if thin text shadows have sufficient contrast with the text', function() { + describe('with text-shadow', function () { + it('passes if thin text shadows have sufficient contrast with the text', function () { var params = checkSetup( '
' + @@ -828,7 +824,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('does not count text shadows of offset 0, blur 0 as part of the background color', function() { + it('does not count text shadows of offset 0, blur 0 as part of the background color', function () { var params = checkSetup( '
' + @@ -844,7 +840,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.contrastRatio, '4.84'); }); - it('passes if thin text shadows have sufficient contrast with the background', function() { + it('passes if thin text shadows have sufficient contrast with the background', function () { var params = checkSetup( '
' + @@ -854,7 +850,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it('fails if text shadows have sufficient contrast with the background if its width is thicker than `shadowOutlineEmMax`', function() { + it('fails if text shadows have sufficient contrast with the background if its width is thicker than `shadowOutlineEmMax`', function () { var checkOptions = { shadowOutlineEmMax: 0.05 }; var params = checkSetup( '
' + @@ -878,7 +874,7 @@ describe('color-contrast', function() { assert.isNull(checkContext._data.messageKey); }); - it('fails if text shadows do not have sufficient contrast with the background', function() { + it('fails if text shadows do not have sufficient contrast with the background', function () { var params = checkSetup( '
' + @@ -889,7 +885,7 @@ describe('color-contrast', function() { assert.equal(checkContext._data.messageKey, 'shadowOnBgColor'); }); - it("fails if thick text shadows don't have sufficient contrast", function() { + it("fails if thick text shadows don't have sufficient contrast", function () { var params = checkSetup( '
' + @@ -899,7 +895,7 @@ describe('color-contrast', function() { assert.isTrue(contrastEvaluate.apply(checkContext, params)); }); - it("passes if thin text shadows don't have sufficient contrast, but the text and background do", function() { + it("passes if thin text shadows don't have sufficient contrast, but the text and background do", function () { var params = checkSetup( '
' + diff --git a/test/checks/lists/only-dlitems.js b/test/checks/lists/only-dlitems.js index 6021e857f3..29d7040bf6 100644 --- a/test/checks/lists/only-dlitems.js +++ b/test/checks/lists/only-dlitems.js @@ -1,19 +1,17 @@ -describe('only-dlitems', function() { +describe('only-dlitems', function () { 'use strict'; var fixture = document.getElementById('fixture'); var checkSetup = axe.testUtils.checkSetup; var shadowSupport = axe.testUtils.shadowSupport; - var isIE11 = axe.testUtils.isIE11; - var checkContext = axe.testUtils.MockCheckContext(); - afterEach(function() { + afterEach(function () { fixture.innerHTML = ''; checkContext.reset(); }); - it('should return false if the list has no contents', function() { + it('should return false if the list has no contents', function () { var checkArgs = checkSetup('
'); assert.isFalse( @@ -23,7 +21,7 @@ describe('only-dlitems', function() { ); }); - it('should return true if the list has non-dd/dt contents', function() { + it('should return true if the list has non-dd/dt contents', function () { var checkArgs = checkSetup('

Not a list

'); assert.isTrue( @@ -34,7 +32,7 @@ describe('only-dlitems', function() { assert.deepEqual(checkContext._relatedNodes, [fixture.querySelector('p')]); }); - it('should return true if the list has non-dd content through role change', function() { + it('should return true if the list has non-dd content through role change', function () { var checkArgs = checkSetup( '
Not a list
' ); @@ -46,7 +44,7 @@ describe('only-dlitems', function() { ); }); - it('should return true if the list has non-dt content through role change', function() { + it('should return true if the list has non-dt content through role change', function () { var checkArgs = checkSetup( '
Not a list
' ); @@ -58,7 +56,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if the list has only a dd', function() { + it('should return false if the list has only a dd', function () { var checkArgs = checkSetup('
A list
'); assert.isFalse( @@ -68,7 +66,7 @@ describe('only-dlitems', function() { ); }); - it('should return true if is used along side dt with its role changed', function() { + it('should return true if is used along side dt with its role changed', function () { var checkArgs = checkSetup( '
A list
' ); @@ -79,7 +77,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if the list has only a dt', function() { + it('should return false if the list has only a dt', function () { var checkArgs = checkSetup('
A list
'); assert.isFalse( @@ -89,7 +87,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if the list has dt and dd with child content', function() { + it('should return false if the list has dt and dd with child content', function () { var checkArgs = checkSetup( '

An item

A list
' ); @@ -101,7 +99,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if the list has dt and dd', function() { + it('should return false if the list has dt and dd', function () { var checkArgs = checkSetup( '
An item
A list
' ); @@ -113,7 +111,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if the list has dt, dd and a comment', function() { + it('should return false if the list has dt, dd and a comment', function () { var checkArgs = checkSetup( '
An item
A list
' ); @@ -125,7 +123,7 @@ describe('only-dlitems', function() { ); }); - it('should return true if the list has a dt and dd with other content', function() { + it('should return true if the list has a dt and dd with other content', function () { var checkArgs = checkSetup( '
Item one
Description

Not a list

' ); @@ -138,7 +136,7 @@ describe('only-dlitems', function() { assert.deepEqual(checkContext._relatedNodes, [fixture.querySelector('p')]); }); - it('should return true if the list has a textNode as a child', function() { + it('should return true if the list has a textNode as a child', function () { var checkArgs = checkSetup( '
hi
hello
hi
' ); @@ -151,23 +149,19 @@ describe('only-dlitems', function() { assert.deepEqual(checkContext._relatedNodes, []); }); - // This currently breaks in IE11 - (isIE11 ? it.skip : it)( - 'should return false if is used along side dt', - function() { - var checkArgs = checkSetup( - '
A list
' - ); + it('should return false if is used along side dt', function () { + var checkArgs = checkSetup( + '
A list
' + ); - assert.isFalse( - axe.testUtils - .getCheckEvaluate('only-dlitems') - .apply(checkContext, checkArgs) - ); - } - ); + assert.isFalse( + axe.testUtils + .getCheckEvaluate('only-dlitems') + .apply(checkContext, checkArgs) + ); + }); - it('should return false if is used along side dt', function() { + it('should return false if is used along side dt', function () { var checkArgs = checkSetup( '
A list
' ); @@ -179,7 +173,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if
A list
' ); @@ -191,7 +185,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if
A list
' ); @@ -203,7 +197,7 @@ describe('only-dlitems', function() { ); }); - it('should return false if