Skip to content
Snippets Groups Projects
Commit 8ed04848 authored by jensmjahle's avatar jensmjahle
Browse files

Add tabindex to file selector in CreateMilestoneView.vue

parent dc999d01
No related branches found
No related tags found
1 merge request!73Wcag improvements
......@@ -82,6 +82,13 @@ const handleFileChange = (event: any) => {
}
reader.readAsDataURL(file)
}
const fileInput = ref(null);
const openFileExplorer = () => {
if (fileInput.value) {
fileInput.value.click();
}
};
</script>
......@@ -156,12 +163,12 @@ const handleFileChange = (event: any) => {
<div class="image-container">
<label>Legg til et bilde</label>
<div class="add-image-box">
<label>
<button @click="openFileExplorer" tabindex="0" type="button">
<input type="file" style="display: none" ref="fileInput" accept="image/png, image/jpeg"
@change="handleFileChange">
<img v-if="image" :src="image" id="literal-image" alt="Selected Image" width="150px" height="150px">
<img v-else src="../../components/icons/image/AddImage.png" alt="Add Image" width="50px" height="50px">
</label>
</button>
</div>
<!-- <div class="existing-pictures">-->
<!-- <div class="existing-image-box"></div>-->
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment