Skip to content

Commit 1c08751

Browse files
Add aria-hidden attr to the whole navigation depending on a sidebar state
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
1 parent 7d19cfb commit 1c08751

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

src/components/NcAppNavigation/NcAppNavigation.vue

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,16 @@ emit('toggle-navigation', {
5959
role="navigation"
6060
:class="{'app-navigation--close':!open }">
6161
<NcAppNavigationToggle :open="open" @update:open="toggleNavigation" />
62-
<slot />
63-
64-
<!-- List for Navigation li-items -->
65-
<ul class="app-navigation__list">
66-
<slot name="list" />
67-
</ul>
68-
69-
<!-- Footer for e.g. AppNavigationSettings -->
70-
<slot name="footer" />
62+
<div :aria-hidden="ariaHidden" class="app-navigation__content">
63+
<slot />
64+
<!-- List for Navigation li-items -->
65+
<ul class="app-navigation__list">
66+
<slot name="list" />
67+
</ul>
68+
69+
<!-- Footer for e.g. AppNavigationSettings -->
70+
<slot name="footer" />
71+
</div>
7172
</div>
7273
</template>
7374

@@ -91,6 +92,11 @@ export default {
9192
open: true,
9293
}
9394
},
95+
computed: {
96+
ariaHidden() {
97+
return this.open ? 'false' : 'true'
98+
},
99+
},
94100
95101
watch: {
96102
isMobile() {
@@ -156,10 +162,6 @@ export default {
156162
-moz-user-select: none;
157163
-ms-user-select: none;
158164
user-select: none;
159-
display: flex;
160-
flex-direction: column;
161-
flex-grow: 0;
162-
flex-shrink: 0;
163165
background-color: var(--color-main-background-blur, var(--color-main-background));
164166
-webkit-backdrop-filter: var(--filter-background-blur, none);
165167
backdrop-filter: var(--filter-background-blur, none);
@@ -183,6 +185,13 @@ export default {
183185
gap: var(--default-grid-baseline, 4px);
184186
padding: calc(var(--default-grid-baseline, 4px) * 2);
185187
}
188+
&__content {
189+
height: 100%;
190+
display: flex;
191+
flex-direction: column;
192+
flex-grow: 0;
193+
flex-shrink: 0;
194+
}
186195
}
187196
188197
// add extra border for high contrast mode

0 commit comments

Comments
 (0)