Skip to content

Commit d4afb19

Browse files
authored
Hide content in the example drawer when closed (#586)
Otherwise the examples are still visible to screen readers and are keyboard focusable.
1 parent 4fe72f6 commit d4afb19

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packages/lit-dev-content/src/components/litdev-drawer.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ export class LitDevDrawer extends LitElement {
4949
overflow-y: hidden !important;
5050
}
5151
52+
:host(:not([open])) > #content {
53+
display: none;
54+
}
55+
5256
#header {
5357
flex: 0 0 var(--litdev-drawer-header-height);
5458
box-sizing: border-box;

0 commit comments

Comments
 (0)