Skip to content

Commit b52ef20

Browse files
committed
fix(accessibility): fix some accessibility issues
Signed-off-by: Anna Larch <anna@nextcloud.com>
1 parent 8039736 commit b52ef20

9 files changed

Lines changed: 18 additions & 11 deletions

File tree

img/activity-dark.svg

Lines changed: 1 addition & 1 deletion
Loading

img/activity.svg

Lines changed: 1 addition & 1 deletion
Loading

img/notifications-dark.svg

Lines changed: 1 addition & 1 deletion
Loading

src/components/CheckboxInput.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -220,15 +220,22 @@ $spacing: 4px;
220220
}
221221
222222
&:not(&--disabled) &__input:hover + &__label,
223-
&:not(&--disabled) &__input:focus + &__label {
223+
&:not(&--disabled) &__input:focus + &__label,
224+
&:not(&--disabled) &__input:focus-visible + &__label {
224225
background-color: var(--color-primary-element-light);
225226
}
226227
227-
// Increase focus effect
228-
&:not(&--disabled) &__input:focus + &__label {
228+
// Increase focus effect for keyboard navigation
229+
&:not(&--disabled) &__input:focus + &__label,
230+
&:not(&--disabled) &__input:focus-visible + &__label {
229231
box-shadow: 0 0 0 2px var(--color-primary-element);
230232
}
231233
234+
// Suppress focus ring for mouse users in browsers that support :focus-visible
235+
&:not(&--disabled) &__input:focus:not(:focus-visible) + &__label {
236+
box-shadow: none;
237+
}
238+
232239
// Switch specific rules
233240
&-switch:not(&--checked) &__icon {
234241
color: var(--color-text-lighter);

src/components/activities/GenericActivity.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
'activity-entry__preview-mimetype': preview.isMimeTypeIcon,
3939
}"
4040
:src="preview.source"
41-
:alt="preview.link ? t('activity', 'Open {filename}', { filename: preview.filename }) : ''">
41+
:alt="preview.link ? t('activity', 'Open {filename}', { filename: preview.filename }) : preview.filename">
4242
</component>
4343
</li>
4444
</ul>

src/components/richArgumentsTypes/FileRichArgument.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
<span
1515
v-if="isRoot"
1616
:title="t('activity', 'Home')"
17-
aria-label="t('activity', 'Home')"
17+
:aria-label="t('activity', 'Home')"
1818
class="icon-home" />
1919
</span>
2020
</template>

src/components/richArgumentsTypes/OpenGraphRichArgument.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<template>
77
<a :href="link">
88
<div :id="`opengraph-${id}`" class="opengraph">
9-
<div v-if="thumbIsDefined" class="opengraph-thumb" :style="`background-image: url('${thumb}')`" />
9+
<div v-if="thumbIsDefined" class="opengraph-thumb" :style="`background-image: url('${thumb}')`" aria-hidden="true" />
1010
<div class="opengraph-name" :class="{ 'opengraph-with-thumb': thumbIsDefined }">{{ name }}</div>
1111
<div class="opengraph-description" :class="{ 'opengraph-with-thumb': thumbIsDefined }">{{ description }}</div>
1212
<span class="opengraph-website">{{ website }}</span>

src/views/ActivityAppFeed.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
<NcIconSvgWrapper :svg="appIconSVG" :size="36" />
2626
</template>
2727
</NcEmptyContent>
28-
<div ref="container" class="activity-app__container">
28+
<div ref="container" class="activity-app__container" aria-live="polite" :aria-busy="loading">
2929
<ActivityGroup v-for="activities, date of groupedActivities" :key="date" :activities="activities" />
3030
<!-- Only show if not showing the inital empty content for loading -->
3131
<NcLoadingIcon

src/views/ActivityTab.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
<NcIconSvgWrapper :svg="lightningBoltSVG" />
4242
</template>
4343
</NcEmptyContent>
44-
<ul v-else class="activity__list">
44+
<ul v-else class="activity__list" aria-live="polite" aria-relevant="additions">
4545
<ActivityComponent
4646
v-for="activity in activities"
4747
:key="activity.id"

0 commit comments

Comments
 (0)