aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_sharing
diff options
context:
space:
mode:
authorPytal <24800714+Pytal@users.noreply.github.com>2023-01-12 14:33:30 -0800
committerGitHub <noreply@github.com>2023-01-12 14:33:30 -0800
commitbec52be8edf0067056840fb8e5b75d39ef84d803 (patch)
tree38c346fafa4d59d7c2e7d364575458fdd49ea148 /apps/files_sharing
parentd389b54e2ade596982a6055afb9db515219b44ae (diff)
parentf09300b343ab7e369265543bce7dc80df0942ab1 (diff)
downloadnextcloud-server-bec52be8edf0067056840fb8e5b75d39ef84d803.tar.gz
nextcloud-server-bec52be8edf0067056840fb8e5b75d39ef84d803.zip
Merge pull request #36056 from nextcloud/enh/a11y-share-link-index
Differentiate share links
Diffstat (limited to 'apps/files_sharing')
-rw-r--r--apps/files_sharing/src/components/SharingEntryLink.vue20
-rw-r--r--apps/files_sharing/src/views/SharingLinkList.vue1
2 files changed, 20 insertions, 1 deletions
diff --git a/apps/files_sharing/src/components/SharingEntryLink.vue b/apps/files_sharing/src/components/SharingEntryLink.vue
index f75a5647df6..66b60ebf3bc 100644
--- a/apps/files_sharing/src/components/SharingEntryLink.vue
+++ b/apps/files_sharing/src/components/SharingEntryLink.vue
@@ -49,6 +49,7 @@
<!-- pending actions -->
<NcActions v-if="!pending && (pendingPassword || pendingExpirationDate)"
class="sharing-entry__actions"
+ :aria-label="actionsTooltip"
menu-align="right"
:open.sync="open"
@close="onNewLinkShare">
@@ -116,6 +117,7 @@
<!-- actions -->
<NcActions v-else-if="!loading"
class="sharing-entry__actions"
+ :aria-label="actionsTooltip"
menu-align="right"
:open.sync="open"
@close="onMenuClose">
@@ -321,6 +323,10 @@ export default {
type: Boolean,
default: true,
},
+ index: {
+ type: Number,
+ default: null,
+ },
},
data() {
@@ -370,6 +376,9 @@ export default {
return this.share.shareWith
}
}
+ if (this.index > 1) {
+ return t('files_sharing', 'Share link ({index})', { index: this.index })
+ }
return t('files_sharing', 'Share link')
},
@@ -531,6 +540,15 @@ export default {
},
/**
+ * Tooltip message for actions button
+ *
+ * @return {string}
+ */
+ actionsTooltip() {
+ return t('files_sharing', 'Actions for "{title}"', { title: this.title })
+ },
+
+ /**
* Tooltip message for copy button
*
* @return {string}
@@ -542,7 +560,7 @@ export default {
}
return t('files_sharing', 'Cannot copy, please copy the link manually')
}
- return t('files_sharing', 'Copy public link to clipboard')
+ return t('files_sharing', 'Copy public link of "{title}" to clipboard', { title: this.title })
},
/**
diff --git a/apps/files_sharing/src/views/SharingLinkList.vue b/apps/files_sharing/src/views/SharingLinkList.vue
index 14ea879e004..ee7418c00d5 100644
--- a/apps/files_sharing/src/views/SharingLinkList.vue
+++ b/apps/files_sharing/src/views/SharingLinkList.vue
@@ -33,6 +33,7 @@
<!-- using shares[index] to work with .sync -->
<SharingEntryLink v-for="(share, index) in shares"
:key="share.id"
+ :index="shares.length > 1 ? index + 1 : null"
:can-reshare="canReshare"
:share.sync="shares[index]"
:file-info="fileInfo"