aboutsummaryrefslogtreecommitdiffstats
path: root/core/src
diff options
context:
space:
mode:
authorjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-04-28 13:55:48 +0200
committerjulia.kirschenheuter <julia.kirschenheuter@nextcloud.com>2023-05-03 11:56:48 +0200
commitad7264ee5a30bfc23f7c40b65e6799a17da52d55 (patch)
tree5ecbcee418cc4f68ee6751d681c810843fa102c1 /core/src
parent9ace8e561df1aa526f11ef6c2b6860502af4bc3c (diff)
downloadnextcloud-server-ad7264ee5a30bfc23f7c40b65e6799a17da52d55.tar.gz
nextcloud-server-ad7264ee5a30bfc23f7c40b65e6799a17da52d55.zip
Add `aria-hidden` attr to the whole navigation depending on a sidebar state
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'core/src')
-rw-r--r--core/src/init.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/init.js b/core/src/init.js
index 867ba94483f..f366dba5d1e 100644
--- a/core/src/init.js
+++ b/core/src/init.js
@@ -160,6 +160,12 @@ export const initCore = () => {
// we need this because dragging stop triggers that
animating = false
})
+ snapper.on('open', () => {
+ $appNavigation.attr('aria-hidden', 'false')
+ })
+ snapper.on('close', () => {
+ $appNavigation.attr('aria-hidden', 'true')
+ })
// These are necessary because calling open or close
// on snapper during an animation makes it trigger an
@@ -213,6 +219,7 @@ export const initCore = () => {
// close sidebar when switching navigation entry
const $appNavigation = $('#app-navigation')
+ $appNavigation.attr('aria-hidden', 'true')
$appNavigation.delegate('a, :button', 'click', event => {
const $target = $(event.target)
// don't hide navigation when changing settings or adding things
@@ -264,6 +271,7 @@ export const initCore = () => {
const toggleSnapperOnSize = () => {
if ($(window).width() > breakpointMobileWidth) {
+ $appNavigation.attr('aria-hidden', 'false')
snapper.close()
snapper.disable()