diff --git a/test/checks/lists/only-dlitems.js b/test/checks/lists/only-dlitems.js index 85cfbbe9f9..6bbf7cd59f 100644 --- a/test/checks/lists/only-dlitems.js +++ b/test/checks/lists/only-dlitems.js @@ -194,6 +194,22 @@ describe('only-dlitems', function() { ); }); + it('should return true if the list mixed items inside a div group with a role', function() { + var checkArgs = checkSetup( + '
An item
A list

Not a list

' + ); + assert.isTrue( + checks['only-dlitems'].evaluate.apply(checkContext, checkArgs) + ); + }); + + it('should return false if there is an empty div', function() { + var checkArgs = checkSetup('
'); + assert.isFalse( + checks['only-dlitems'].evaluate.apply(checkContext, checkArgs) + ); + }); + it('returns false if there are display:none elements that normally would not be allowed', function() { var checkArgs = checkSetup( '
An item
A list

heading

' @@ -203,6 +219,13 @@ describe('only-dlitems', function() { ); }); + it('should return true if there is a div with text', function() { + var checkArgs = checkSetup('
text
'); + assert.isTrue( + checks['only-dlitems'].evaluate.apply(checkContext, checkArgs) + ); + }); + it('returns false if there are visibility:hidden elements that normally would not be allowed', function() { var checkArgs = checkSetup( '
An item
A list

heading

' @@ -212,6 +235,13 @@ describe('only-dlitems', function() { ); }); + it('should return true if there is a div with non-dd / dt elements', function() { + var checkArgs = checkSetup('

text

'); + assert.isTrue( + checks['only-dlitems'].evaluate.apply(checkContext, checkArgs) + ); + }); + it('returns false if there are aria-hidden=true elements that normally would not be allowed', function() { var checkArgs = checkSetup( '
An item
A list

heading

'