diff --git a/lib/checks/tables/same-caption-summary.js b/lib/checks/tables/same-caption-summary.js index d8bdd9772f..99038738d6 100644 --- a/lib/checks/tables/same-caption-summary.js +++ b/lib/checks/tables/same-caption-summary.js @@ -1,2 +1,4 @@ -// passing node.caption to accessibleText instead of using the logic in accessibleTextVirtual on virtualNode -return !!(node.summary && node.caption) && node.summary === axe.commons.text.accessibleText(node.caption); +// passing node.caption to accessibleText instead of using +// the logic in accessibleTextVirtual on virtualNode +return !!(node.summary && node.caption) && + node.summary.toLowerCase() === axe.commons.text.accessibleText(node.caption).toLowerCase(); diff --git a/test/checks/tables/same-caption-summary.js b/test/checks/tables/same-caption-summary.js index 3756d7381e..a17b6284ad 100644 --- a/test/checks/tables/same-caption-summary.js +++ b/test/checks/tables/same-caption-summary.js @@ -42,6 +42,20 @@ describe('same-caption-summary', function () { assert.isTrue(checks['same-caption-summary'].evaluate.apply(checkContext, params)); }); + it('should return true if summary and caption are the same with mixed casing', function () { + var params = checkSetup('' + + '' + + '' + + '' + + '' + + '' + + '' + + '' + + '
my table
Head
Data
'); + + assert.isTrue(checks['same-caption-summary'].evaluate.apply(checkContext, params)); + }); + (shadowSupport.v1 ? it : xit)('should match slotted caption elements', function () { var params = shadowCheckSetup( '
' +