From 74851c832fe94c5701a8b54b99e43a3054e392ba Mon Sep 17 00:00:00 2001 From: Mitchell Austin Date: Sun, 2 Jul 2023 23:23:18 -0700 Subject: [PATCH] =?UTF-8?q?Update=20unit=20tests=20for=20Modal=E2=80=99s?= =?UTF-8?q?=20aria=20helper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/components/src/modal/test/aria-helper.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/components/src/modal/test/aria-helper.ts b/packages/components/src/modal/test/aria-helper.ts index 0ee9b0b947aa51..7fba95a1eb3bf6 100644 --- a/packages/components/src/modal/test/aria-helper.ts +++ b/packages/components/src/modal/test/aria-helper.ts @@ -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 ); } );