Skip to content

Commit 6e6a4c8

Browse files
committed
fixup! ⚡️(frontend) improve accessibility of selected document's sub-menu
1 parent c81509a commit 6e6a4c8

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

src/frontend/apps/impress/src/features/docs/doc-tree/components/DocSubPageItem.tsx

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,11 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
115115
aria-selected={isSelected}
116116
aria-expanded={hasChildren ? isExpanded : undefined}
117117
$css={css`
118-
background-color: ${isActive
119-
? 'var(--c--theme--colors--greyscale-100)'
120-
: 'var(--c--theme--colors--greyscale-000)'};
118+
/* Ensure the outline (handled by TreeView) matches the visual area */
119+
.c__tree-view--node {
120+
padding: ${spacingsTokens['3xs']};
121+
border-radius: 4px;
122+
}
121123
122124
.light-doc-item-actions {
123125
display: flex;
@@ -126,9 +128,6 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
126128
right: 0;
127129
top: 0;
128130
height: 100%;
129-
background: ${isDesktop
130-
? 'var(--c--theme--colors--greyscale-100)'
131-
: 'var(--c--theme--colors--greyscale-000)'};
132131
z-index: 10;
133132
}
134133
@@ -145,16 +144,15 @@ export const DocSubPageItem = (props: TreeViewNodeProps<Doc>) => {
145144
}
146145
}
147146
148-
&:hover,
149-
&:focus-within {
147+
.c__tree-view--node:hover,
148+
.c__tree-view--node:focus-within {
150149
background-color: var(--c--theme--colors--greyscale-100);
151-
border-radius: 4px;
152150
153151
.light-doc-item-actions {
154152
display: flex;
155153
opacity: 1;
156154
visibility: visible;
157-
background: var(--c--theme--colors--greyscale-100);
155+
/* background: var(--c--theme--colors--greyscale-100); */
158156
}
159157
}
160158

0 commit comments

Comments
 (0)