Skip to content

Commit

Permalink
Update unit tests for Modal’s aria helper
Browse files Browse the repository at this point in the history
  • Loading branch information
stokesman committed Aug 20, 2023
1 parent 6bf3f2f commit 74851c8
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/components/src/modal/test/aria-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,9 @@ describe( 'aria-helper', () => {
expect( elementShouldBeHidden( element ) ).toBe( false );
} );

it( 'should return false when an element has the aria-hidden attribute with value "true"', () => {
it( 'should return false when an element has the inert attribute', () => {
const element = document.createElement( 'div' );
element.setAttribute( 'aria-hidden', 'true' );

expect( elementShouldBeHidden( element ) ).toBe( false );
} );

it( 'should return false when an element has the aria-hidden attribute with value "false"', () => {
const element = document.createElement( 'div' );
element.setAttribute( 'aria-hidden', 'false' );
element.setAttribute( 'inert', '' );

expect( elementShouldBeHidden( element ) ).toBe( false );
} );
Expand Down

0 comments on commit 74851c8

Please sign in to comment.