]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix(files_sharing): Ensure sidebar share entry lists are labelled
authorFerdinand Thiessen <opensource@fthiessen.de>
Wed, 4 Sep 2024 21:10:05 +0000 (23:10 +0200)
committerFerdinand Thiessen <opensource@fthiessen.de>
Fri, 6 Sep 2024 01:38:48 +0000 (03:38 +0200)
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
apps/files_sharing/src/views/SharingLinkList.vue
apps/files_sharing/src/views/SharingList.vue

index b10f41eaa152a7b73491cdcf3c0ba606161bc061..2d800c97000081da7c6bda7ebdefae4d6a8289e3 100644 (file)
@@ -4,7 +4,9 @@
 -->
 
 <template>
-       <ul v-if="canLinkShare" class="sharing-link-list">
+       <ul v-if="canLinkShare"
+               :aria-label="t('files_sharing', 'Link shares')"
+               class="sharing-link-list">
                <!-- If no link shares, show the add link default entry -->
                <SharingEntryLink v-if="!hasLinkShares && canReshare"
                        :can-reshare="canReshare"
@@ -30,8 +32,8 @@
 
 <script>
 import { getCapabilities } from '@nextcloud/capabilities'
+import { t } from '@nextcloud/l10n'
 
-// eslint-disable-next-line no-unused-vars
 import Share from '../models/Share.js'
 import ShareTypes from '../mixins/ShareTypes.js'
 import SharingEntryLink from '../components/SharingEntryLink.vue'
@@ -92,6 +94,8 @@ export default {
        },
 
        methods: {
+               t,
+
                /**
                 * Add a new share into the link shares list
                 * and return the newly created share component
index 7294294afa400d072698d1159caa3fc1866ac4bd..4d25e5cfeec3618c96e5339ecd9ff96ab70f1e6f 100644 (file)
@@ -4,7 +4,7 @@
 -->
 
 <template>
-       <ul class="sharing-sharee-list">
+       <ul class="sharing-sharee-list" :aria-label="t('files_sharing', 'Shares')">
                <SharingEntry v-for="share in shares"
                        :key="share.id"
                        :file-info="fileInfo"
@@ -15,7 +15,7 @@
 </template>
 
 <script>
-// eslint-disable-next-line no-unused-vars
+import { t } from '@nextcloud/l10n'
 import SharingEntry from '../components/SharingEntry.vue'
 import ShareTypes from '../mixins/ShareTypes.js'
 import ShareDetails from '../mixins/ShareDetails.js'
@@ -41,6 +41,12 @@ export default {
                        required: true,
                },
        },
+
+       setup() {
+               return {
+                       t,
+               }
+       },
        computed: {
                hasShares() {
                        return this.shares.length === 0