feat(minimap,a11y): add ariaLabel to minimap options

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-20 00:38:56 +01:00
committed by Braks
parent 9f50dd0865
commit 9508dea863
2 changed files with 4 additions and 1 deletions
+2 -1
View File
@@ -22,6 +22,7 @@ const {
maskStrokeWidth = 1,
pannable = false,
zoomable = false,
ariaLabel = 'Vue Flow mini map',
} = defineProps<MiniMapProps>()
const emit = defineEmits(['click', 'nodeClick', 'nodeDblclick', 'nodeMouseenter', 'nodeMousemove', 'nodeMouseleave'])
@@ -204,7 +205,7 @@ export default {
:aria-labelledby="`vue-flow__minimap-${id}`"
@click="onSvgClick"
>
<title :id="`vue-flow__minimap-${id}`">Vue Flow mini map {{ id }}</title>
<title v-if="ariaLabel" :id="`vue-flow__minimap-${id}`">{{ ariaLabel }}</title>
<MiniMapNode
v-for="node of nodes"
+2
View File
@@ -36,6 +36,8 @@ export interface MiniMapProps {
width?: number
height?: number
ariaLabel?: string | null
}
/** these props are passed to mini map node slots */