Skip to content

Commit 3e8ad25

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

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

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

Lines changed: 8 additions & 14 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,35 +128,27 @@ 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
135134
&:focus-within .light-doc-item-actions {
136135
display: flex;
137136
opacity: 1;
138137
visibility: visible;
139-
background: var(--c--theme--colors--greyscale-100);
140138
}
141139
142140
.c__tree-view--node.isSelected {
143-
.light-doc-item-actions {
144-
background: var(--c--theme--colors--greyscale-100);
145-
}
146141
}
147142
148-
&:hover,
149-
&:focus-within {
143+
.c__tree-view--node:hover,
144+
.c__tree-view--node:focus-within {
150145
background-color: var(--c--theme--colors--greyscale-100);
151-
border-radius: 4px;
152146
153147
.light-doc-item-actions {
154148
display: flex;
155149
opacity: 1;
156150
visibility: visible;
157-
background: var(--c--theme--colors--greyscale-100);
151+
/* background: var(--c--theme--colors--greyscale-100); */
158152
}
159153
}
160154

0 commit comments

Comments
 (0)