feat(a11y): add accessible names to icon-only buttons
Adds aria-label to sidebar toggle, mobile overlay, banner close, modal close, quick actions close, task detail close, and dropdown trigger buttons. Adds triggerLabel prop to Dropdown component. Fixes WCAG 4.1.2 (Name, Role, Value).
This commit is contained in:
parent
732b65ba7c
commit
11ffb530be
|
|
@ -12,6 +12,7 @@
|
|||
{{ $t('home.addToHomeScreen') }}
|
||||
</p>
|
||||
<BaseButton
|
||||
:aria-label="$t('misc.closeBanner')"
|
||||
class="hide-button"
|
||||
@click="() => hideMessage = true"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
<div class="content-auth">
|
||||
<BaseButton
|
||||
v-show="menuActive"
|
||||
:aria-label="$t('navigation.closeSidebar')"
|
||||
class="menu-hide-button d-print-none"
|
||||
@click="baseStore.setMenuActive(false)"
|
||||
>
|
||||
|
|
@ -32,6 +33,7 @@
|
|||
>
|
||||
<BaseButton
|
||||
v-show="menuActive"
|
||||
:aria-label="$t('navigation.closeSidebar')"
|
||||
class="mobile-overlay d-print-none"
|
||||
@click="baseStore.setMenuActive(false)"
|
||||
/>
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ const enabled = computed(() => configStore.demoModeEnabled && !hide.value)
|
|||
<strong class="is-uppercase">{{ $t('demo.everythingWillBeDeleted') }}</strong>
|
||||
</p>
|
||||
<BaseButton
|
||||
:aria-label="$t('misc.closeBanner')"
|
||||
class="hide-button"
|
||||
@click="() => hide = true"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
>
|
||||
<BaseButton
|
||||
class="dropdown-trigger is-flex"
|
||||
:aria-label="triggerLabel"
|
||||
@click="toggleOpen"
|
||||
>
|
||||
<Icon
|
||||
|
|
@ -49,8 +50,10 @@ import BaseButton from '@/components/base/BaseButton.vue'
|
|||
|
||||
withDefaults(defineProps<{
|
||||
triggerIcon?: IconProp
|
||||
triggerLabel?: string
|
||||
}>(), {
|
||||
triggerIcon: 'ellipsis-h',
|
||||
triggerLabel: undefined,
|
||||
})
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@
|
|||
@mousedown.self.prevent.stop="$emit('close')"
|
||||
>
|
||||
<BaseButton
|
||||
:aria-label="$t('misc.closeDialog')"
|
||||
class="close"
|
||||
@click="$emit('close')"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@
|
|||
v-if="canWrite && !collapsedBuckets[bucket.id]"
|
||||
class="is-right options"
|
||||
trigger-icon="ellipsis-v"
|
||||
:trigger-label="$t('project.kanban.bucketOptions')"
|
||||
@close="() => showSetLimitInput = false"
|
||||
>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@
|
|||
v-if="isNewTaskCommand"
|
||||
/>
|
||||
<BaseButton
|
||||
:aria-label="$t('misc.closeQuickActions')"
|
||||
class="close"
|
||||
@click="closeQuickActions"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
/>
|
||||
<BaseButton
|
||||
v-if="hasClose"
|
||||
:aria-label="$t('task.detail.closeTaskDetail')"
|
||||
class="close"
|
||||
@click="$emit('close')"
|
||||
>
|
||||
|
|
@ -37,6 +38,7 @@
|
|||
</h1>
|
||||
<BaseButton
|
||||
v-if="hasClose"
|
||||
:aria-label="$t('task.detail.closeTaskDetail')"
|
||||
class="close"
|
||||
@click="$emit('close')"
|
||||
>
|
||||
|
|
|
|||
Loading…
Reference in New Issue