diff --git a/test/rule-matches/heading-matches.js b/test/rule-matches/heading-matches.js index 59f8250540..6dcb19e3f9 100644 --- a/test/rule-matches/heading-matches.js +++ b/test/rule-matches/heading-matches.js @@ -6,6 +6,8 @@ describe('heading-matches', function () { beforeEach(function () { rule = axe.utils.getRule('empty-heading'); + assert.isObject(rule, 'Rule object should be available'); + assert.isFunction(rule.matches, 'Rule should have a matches function'); }); it('is a function', function () { @@ -29,22 +31,22 @@ describe('heading-matches', function () { } }); - it('should return false on headings with their role changes', function () { + it('should return false on headings that no longer function as headings due to a valid role change', function () { const vNode = queryFixture('

'); assert.isFalse(rule.matches(null, vNode)); }); - it('should return true on headings with their role changes to an invalid role', function () { + it('should return true on headings with their role changed to an invalid role', function () { const vNode = queryFixture('

'); assert.isTrue(rule.matches(null, vNode)); }); - it('should return true on headings with their role changes to an abstract role', function () { + it('should return true on headings with their role changed to an abstract role', function () { const vNode = queryFixture('

'); assert.isTrue(rule.matches(null, vNode)); }); - it('should return true on headings with explicit role="none" and an empty aria-label to account for presentation conflict resolution', function () { + it('should return true on headings with explicit role="none" and an empty aria-label (handling presentation conflict resolution)', function () { const vNode = queryFixture( '

' );