Skip to content

Commit

Permalink
fix(a11y): Return focus to Add button on dialog close
Browse files Browse the repository at this point in the history
Signed-off-by: Christopher Ng <chrng8@gmail.com>
  • Loading branch information
Pytal authored and backportbot[bot] committed Jan 24, 2024
1 parent 3e621dc commit 1162917
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/views/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<div class="timeline__header__left">
<!-- TODO: UploadPicker -->
<NcActions v-if="selectedFileIds.length === 0"
ref="addActions"
:force-menu="true"
:menu-name="t('photos', 'Add')">
<template #icon>
Expand Down Expand Up @@ -126,6 +127,7 @@

<NcModal v-if="showAlbumCreationForm"
key="albumCreationForm"
:set-return-focus="$refs.addActions?.$refs.menuButton?.$el"
@close="showAlbumCreationForm = false">
<h2 class="timeline__heading">
{{ t('photos', 'New album') }}
Expand Down

0 comments on commit 1162917

Please sign in to comment.