Merge pull request #41580 from nextcloud/fix/a11y-replace_action_link_with_action_button

Replace ActionLink with ActionButton on sharing tab
This commit is contained in:
Grigorii K. Shartsev 2023-11-17 21:55:30 +05:00 committed by GitHub
commit 8e3a08d161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 13 additions and 18 deletions

View file

@ -8,12 +8,10 @@
<div class="avatar-external icon-external-white" />
</template>
<NcActionLink :href="internalLink"
<NcActionButton :title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:title="copyLinkTooltip"
target="_blank"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.prevent="copyLink" />
@click="copyLink" />
</SharingEntrySimple>
</ul>
</template>
@ -21,14 +19,14 @@
<script>
import { generateUrl } from '@nextcloud/router'
import { showSuccess } from '@nextcloud/dialogs'
import NcActionLink from '@nextcloud/vue/dist/Components/NcActionLink.js'
import NcActionButton from '@nextcloud/vue/dist/Components/NcActionButton.js'
import SharingEntrySimple from './SharingEntrySimple.vue'
export default {
name: 'SharingEntryInternal',
components: {
NcActionLink,
NcActionButton,
SharingEntrySimple,
},
@ -85,7 +83,6 @@ export default {
try {
await navigator.clipboard.writeText(this.internalLink)
showSuccess(t('files_sharing', 'Link copied'))
// focus and show the tooltip (note: cannot set ref on NcActionLink)
this.$refs.shareEntrySimple.$refs.actionsComponent.$el.focus()
this.copySuccess = true
this.copied = true

View file

@ -43,12 +43,10 @@
<!-- clipboard -->
<NcActions v-if="share && !isEmailShareType && share.token" ref="copyButton" class="sharing-entry__copy">
<NcActionLink :href="shareLink"
target="_blank"
:title="copyLinkTooltip"
<NcActionButton :title="copyLinkTooltip"
:aria-label="copyLinkTooltip"
:icon="copied && copySuccess ? 'icon-checkmark-color' : 'icon-clippy'"
@click.stop.prevent="copyLink" />
@click.prevent="copyLink" />
</NcActions>
</div>

3
dist/486-486.js vendored Normal file

File diff suppressed because one or more lines are too long

1
dist/486-486.js.map vendored Normal file

File diff suppressed because one or more lines are too long

3
dist/4997-4997.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long