diff --git a/lib/checks/shared/button-has-visible-text.json b/lib/checks/shared/button-has-visible-text.json index e28465f5f3..74173071da 100644 --- a/lib/checks/shared/button-has-visible-text.json +++ b/lib/checks/shared/button-has-visible-text.json @@ -5,7 +5,8 @@ "impact": "critical", "messages": { "pass": "Element has inner text that is visible to screen readers", - "fail": "Element does not have inner text that is visible to screen readers" + "fail": "Element does not have inner text that is visible to screen readers", + "incomplete": "Unable to determine if element has children" } } } diff --git a/test/checks/shared/button-has-visible-text.js b/test/checks/shared/button-has-visible-text.js index 042832d40a..9c64c249fe 100644 --- a/test/checks/shared/button-has-visible-text.js +++ b/test/checks/shared/button-has-visible-text.js @@ -52,4 +52,16 @@ describe('button-has-visible-text', function() { .apply(checkContext, checkArgs) ); }); + + describe('SerialVirtualNode', function() { + it('should return undefined if no other attributes are provided', function() { + var node = new axe.SerialVirtualNode({ + nodeName: 'button' + }); + + assert.isUndefined( + axe.testUtils.getCheckEvaluate('has-visible-text')(null, {}, node) + ); + }); + }); });