Skip to content

Commit 5da7b08

Browse files
fix(a11y): add alt prop to PreviewSignature image element
Adds an alt prop with a translatable default ('Signature preview') so consumers can pass context-specific descriptions while keeping a sensible fallback for screen readers. Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent c358dda commit 5da7b08

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

src/components/PreviewSignature/PreviewSignature.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<div v-show="isLoaded" class="wrapper">
99
<img v-show="isLoaded"
1010
:src="imageData"
11+
:alt="alt"
1112
:style="{
1213
width,
1314
height,
@@ -41,6 +42,12 @@ export default {
4142
required: false,
4243
default: '',
4344
},
45+
alt: {
46+
type: String,
47+
required: false,
48+
// TRANSLATORS Alt text for an image showing the user's handwritten, typed, or uploaded signature. Used as fallback when the parent component does not pass a more specific description, for example "Current signature" or "Confirm your initials".
49+
default: () => t('libresign', 'Signature preview'),
50+
},
4451
},
4552
data() {
4653
return {

0 commit comments

Comments
 (0)