Skip to content

Commit d65bdbd

Browse files
fix(a11y): name the back entry of a question type's sub menu
The first entry of the sub menu of "Grid" and "Linear scale" in the add-question menu leads back to all question types, but it was named only after the question type, like the entry that opened the sub menu, and it is the entry that receives focus. A screen reader user could not tell that it goes back. It is now named, for example, "Linear scale, back to all question types". Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
1 parent 00f48a4 commit d65bdbd

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎src/components/AddQuestionMenu.vue‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@
3434
</template>
3535

3636
<template v-else>
37+
<!-- TRANSLATORS Name of the entry that leaves the sub types of a question type, e.g. "Grid, back to all question types" -->
3738
<NcActionButton
39+
:aria-label="
40+
t('forms', '{type}, back to all question types', {
41+
type: answerTypesFilter[activeQuestionType].label,
42+
})
43+
"
3844
:disabled="isLoadingQuestions"
3945
class="question-menu__question"
4046
@click="activeQuestionType = null">
@@ -73,6 +79,7 @@ import type { AnswerTypeConfig } from '../models/AnswerTypes.ts'
7379
7480
import IconPlus from '@material-symbols/svg-400/outlined/add.svg?raw'
7581
import IconChevronLeft from '@material-symbols/svg-400/outlined/chevron_left.svg?raw'
82+
import { t } from '@nextcloud/l10n'
7683
import { defineComponent, ref, watch } from 'vue'
7784
import NcActionButton from '@nextcloud/vue/components/NcActionButton'
7885
import NcActions from '@nextcloud/vue/components/NcActions'
@@ -161,6 +168,7 @@ export default defineComponent({
161168
openLocal,
162169
onPrimaryClick,
163170
onSubtypeClick,
171+
t,
164172
IconChevronLeft,
165173
IconPlus,
166174
}

0 commit comments

Comments
 (0)