improve a11y

This commit is contained in:
lesion
2022-02-26 21:19:59 +01:00
parent 229a0ed9c4
commit 9e2ed063b6
5 changed files with 27 additions and 29 deletions

View File

@@ -19,7 +19,7 @@
client-only client-only
v-menu(offset-y) v-menu(offset-y)
template(v-slot:activator="{on}") template(v-slot:activator="{on}")
v-btn.align-self-end(icon v-on='on' color='primary' aria-label='more') v-btn.align-self-end(icon v-on='on' color='primary' title='more' aria-label='more')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-list(dense) v-list(dense)
v-list-item-group v-list-item-group

View File

@@ -11,19 +11,19 @@
v-list-item-subtitle {{settings.description}} v-list-item-subtitle {{settings.description}}
v-spacer v-spacer
v-btn(v-if='$auth.loggedIn || settings.allow_anon_event' icon nuxt to='/add' :aria-label='$t("common.add_event")') v-btn(v-if='$auth.loggedIn || settings.allow_anon_event' icon nuxt to='/add' :aria-label='$t("common.add_event")' :title='$t("common.add_event")')
v-icon(large color='primary' v-text='mdiPlus') v-icon(large color='primary' v-text='mdiPlus')
v-btn(icon nuxt to='/export' :aria-label='$t("common.share")') v-btn(icon nuxt to='/export' :title='$t("common.share")' :aria-label='$t("common.share")')
v-icon(v-text='mdiShareVariant') v-icon(v-text='mdiShareVariant')
v-btn(v-if='!$auth.loggedIn' icon nuxt to='/login' :aria-label='$t("common.login")') v-btn(v-if='!$auth.loggedIn' icon nuxt to='/login' :title='$t("common.login")' :aria-label='$t("common.login")')
v-icon(v-text='mdiLogin') v-icon(v-text='mdiLogin')
client-only client-only
v-menu(v-if='$auth.loggedIn' offset-y) v-menu(v-if='$auth.loggedIn' offset-y)
template(v-slot:activator="{ on, attrs }") template(v-slot:activator="{ on, attrs }")
v-btn(icon v-bind='attrs' v-on='on' aria-label='Menu') v-btn(icon v-bind='attrs' v-on='on' title='Menu' aria-label='Menu')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-list v-list
v-list-item(nuxt to='/settings') v-list-item(nuxt to='/settings')
@@ -44,11 +44,11 @@
v-list-item-content v-list-item-content
v-list-item-title {{$t('common.logout')}} v-list-item-title {{$t('common.logout')}}
template(#placeholder) template(#placeholder)
v-btn(v-if='$auth.loggedIn' icon aria-label='Menu') v-btn(v-if='$auth.loggedIn' icon aria-label='Menu' title='Menu')
v-icon(v-text='mdiDotsVertical') v-icon(v-text='mdiDotsVertical')
v-btn(icon target='_blank' :href='feedLink' aria-label='RSS') v-btn(icon target='_blank' :href='feedLink' title='RSS' aria-label='RSS')
v-icon(color='orange' v-text='mdiRss') v-icon(color='orange' v-text='mdiRss')
</template> </template>

View File

@@ -40,7 +40,7 @@ export default {
try { try {
await this.$axios.$put(`/event/confirm/${event.id}`) await this.$axios.$put(`/event/confirm/${event.id}`)
this.$emit('confirmed', event.id) this.$emit('confirmed', event.id)
this.$root.$message('event.confirmed') this.$root.$message('event.confirmed', { color: 'success' })
} catch (e) {} } catch (e) {}
}, },
async remove (event) { async remove (event) {

View File

@@ -13,12 +13,13 @@
no-filter no-filter
item-text='name' item-text='name'
@change='selectPlace') @change='selectPlace')
template(v-slot:item="{ item }") template(v-slot:item="{ item, attrs, on }")
v-list-item(v-bind='attrs' v-on='on')
v-list-item-content(two-line v-if='item.create') v-list-item-content(two-line v-if='item.create')
v-list-item-title <v-icon color='primary' v-text='mdiPlus'></v-icon> {{item.name}} v-list-item-title <v-icon color='primary' v-text='mdiPlus' :aria-label='add'></v-icon> {{item.name}}
v-list-item-content(two-line v-else) v-list-item-content(two-line v-else)
v-list-item-title {{item.name}} v-list-item-title(v-text='item.name')
v-list-item-subtitle {{item.address}} v-list-item-subtitle(v-text='item.address')
v-col(cols=12 md=6) v-col(cols=12 md=6)
v-text-field(ref='address' v-text-field(ref='address'

View File

@@ -21,7 +21,7 @@ v-container#event.pa-0.pa-sm-2
.p-description.text-body-1.pa-3.rounded(v-if='!hasMedia && event.description' itemprop='description' v-html='event.description') .p-description.text-body-1.pa-3.rounded(v-if='!hasMedia && event.description' itemprop='description' v-html='event.description')
v-col.col-12.col-lg-4 v-col.col-12.col-lg-4
v-card v-card(outlined)
v-card-text v-card-text
v-icon.float-right(v-if='event.parentId' color='success' v-text='mdiRepeat') v-icon.float-right(v-if='event.parentId' color='success' v-text='mdiRepeat')
.title.text-h5 .title.text-h5
@@ -47,17 +47,12 @@ v-container#event.pa-0.pa-sm-2
//- info & actions //- info & actions
v-toolbar v-toolbar
v-tooltip(bottom) {{$t('common.copy_link')}} v-btn.ml-2(large icon :title="$t('common.copy_link')" :aria-label="$t('common.copy_link')" color='primary'
template(v-slot:activator="{on, attrs} ") @click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
v-btn.ml-2(large icon v-on='on' color='primary' @click='clipboard(`${settings.baseurl}/event/${event.slug || event.id}`)')
v-icon(v-text='mdiContentCopy') v-icon(v-text='mdiContentCopy')
v-tooltip(bottom) {{$t('common.embed')}} v-btn.ml-2(large icon :title="$t('common.embed')" :aria-label="$t('common.embed')" @click='showEmbed=true' color='primary')
template(v-slot:activator="{on, attrs} ")
v-btn.ml-2(large icon v-on='on' @click='showEmbed=true' color='primary')
v-icon(v-text='mdiCodeTags') v-icon(v-text='mdiCodeTags')
v-tooltip(bottom) {{$t('common.add_to_calendar')}} v-btn.ml-2(large icon :title="$t('common.add_to_calendar')" color='primary' :aria-label="$t('common.add_to_calendar')"
template(v-slot:activator="{on, attrs} ")
v-btn.ml-2(large icon v-on='on' color='primary'
:href='`/api/event/${event.slug || event.id}.ics`') :href='`/api/event/${event.slug || event.id}.ics`')
v-icon(v-text='mdiCalendarExport') v-icon(v-text='mdiCalendarExport')
@@ -87,7 +82,7 @@ v-container#event.pa-0.pa-sm-2
span {{currentAttachmentLabel}} span {{currentAttachmentLabel}}
v-card.mb-3.resources(v-if='settings.enable_resources' v-for='resource in event.resources' v-card.mb-3.resources(v-if='settings.enable_resources' v-for='resource in event.resources'
:key='resource.id' :class='{disabled: resource.hidden}' elevation='10' outlined) :key='resource.id' elevation='10' :flat='resource.hidden' outlined)
v-card-title v-card-title
v-menu(v-if='$auth.user && $auth.user.is_admin' offset-y) v-menu(v-if='$auth.user && $auth.user.is_admin' offset-y)
template(v-slot:activator="{ on }") template(v-slot:activator="{ on }")
@@ -103,6 +98,8 @@ v-container#event.pa-0.pa-sm-2
v-list-item(@click='blockUser(resource)') v-list-item(@click='blockUser(resource)')
v-list-item-title <v-icon left v-text='mdiLock'></v-icon> {{$t('admin.block_user')}} v-list-item-title <v-icon left v-text='mdiLock'></v-icon> {{$t('admin.block_user')}}
v-icon.mr-1(v-show='resource.hidden' v-text='mdiEyeOff')
a(:href='resource.data.url || resource.data.context') a(:href='resource.data.url || resource.data.context')
small {{resource.data.published|dateFormat('ddd, D MMMM HH:mm')}} small {{resource.data.published|dateFormat('ddd, D MMMM HH:mm')}}