diff --git a/packages/chrome/src/elements/sheet/Sheet.spec.tsx b/packages/chrome/src/elements/sheet/Sheet.spec.tsx index 4837c521f25..5055d2e2b45 100644 --- a/packages/chrome/src/elements/sheet/Sheet.spec.tsx +++ b/packages/chrome/src/elements/sheet/Sheet.spec.tsx @@ -52,11 +52,19 @@ describe('Sheet', () => { expect(getByRole('complementary')).toBe(ref.current); }); + it('is inert when closed', () => { + const { getByRole } = render(); + const sheet = getByRole('complementary'); + + expect(sheet).toHaveAttribute('inert'); + }); + it('contains a11y bindings to label and describe the sheet', () => { const { getByRole } = render(); const sheet = getByRole('complementary'); expect(screen.getByLabelText('title')).toBe(sheet); expect(sheet).toHaveAccessibleDescription('description'); + expect(sheet).not.toHaveAttribute('inert'); }); }); diff --git a/packages/chrome/src/elements/sheet/Sheet.tsx b/packages/chrome/src/elements/sheet/Sheet.tsx index 5d2b1ee790c..a560700b4aa 100644 --- a/packages/chrome/src/elements/sheet/Sheet.tsx +++ b/packages/chrome/src/elements/sheet/Sheet.tsx @@ -51,6 +51,7 @@ const SheetComponent = React.forwardRef( return (