Skip to content

Commit

Permalink
Remove Action from CheckboxBlankCircle and add more description text
Browse files Browse the repository at this point in the history
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
  • Loading branch information
JuliaKirschenheuter committed Mar 14, 2022
1 parent c0e1095 commit 3efa4af
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/components/AppNavigation/CalendarList/CalendarListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,19 @@
<AppNavigationItem
v-click-outside="closeShareMenu"
:loading="calendar.loading"
:aria-description="descriptionAppNavigationItem"
:title="calendar.displayName || $t('calendar', 'Untitled calendar')"
:class="{deleted: !!deleteTimeout, disabled: !calendar.enabled, 'open-sharing': shareMenuOpen}"
@click.prevent.stop="toggleEnabled">
<template slot="icon">
<Actions>
<ActionButton @click.prevent.stop="toggleEnabled">
<template #icon>
<CheckboxBlankCircle
v-if="calendar.enabled"
:title="$t('calendar', 'Disable calendar')"
:size="20"
:fill-color="calendar.color" />
<CheckboxBlankCircleOutline
v-else
:title="$t('calendar', 'Enable calendar')"
:size="20"
:fill-color="calendar.color" />
</template>
</ActionButton>
</Actions>
<CheckboxBlankCircle
v-if="calendar.enabled"
:size="20"
:fill-color="calendar.color" />
<CheckboxBlankCircleOutline
v-else
:size="20"
:fill-color="calendar.color" />
</template>

<template v-if="!deleteTimeout" slot="counter">
Expand Down Expand Up @@ -342,6 +335,16 @@ export default {
return ''
},
/**
* compute aria-description for AppNavigationItem link
*
* @return {string}
*/
descriptionAppNavigationItem() {
return this.calendar.enabled
? t('calendar', 'Disable calendar "{calendar}"', { calendar: this.calendar.displayName })
: t('calendar', 'Enable calendar "{calendar}"', { calendar: this.calendar.displayName })
},
},
methods: {
/**
Expand Down

0 comments on commit 3efa4af

Please sign in to comment.