Skip to content

Commit c358dda

Browse files
fix(a11y): add role="img" and aria-label to signature position box
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent fc2ce10 commit c358dda

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

src/components/PdfEditor/SignatureBox.vue

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,16 @@
33
- SPDX-License-Identifier: AGPL-3.0-or-later
44
-->
55
<template>
6-
<div class="signature-box" :style="boxStyle">
7-
<span class="label">{{ label }}</span>
6+
<div class="signature-box"
7+
:style="boxStyle"
8+
role="img"
9+
:aria-label="signatureBoxAriaLabel">
10+
<span class="label" aria-hidden="true">{{ label }}</span>
811
</div>
912
</template>
1013

1114
<script>
15+
import { t } from '@nextcloud/l10n'
1216
import { usernameToColor } from '@nextcloud/vue/functions/usernameToColor'
1317
1418
export default {
@@ -24,6 +28,10 @@ export default {
2428
},
2529
},
2630
computed: {
31+
signatureBoxAriaLabel() {
32+
// TRANSLATORS Accessible label for a placed signature box on the PDF. {name} is the signer's display name.
33+
return t('libresign', 'Signature position for {name}', { name: this.label })
34+
},
2735
boxStyle() {
2836
const signer = this.signer || {}
2937
const seed = signer.displayName || signer.name || signer.email || signer.id || this.label

0 commit comments

Comments
 (0)