feat(minimap,a11y): add ariaLabel to minimap options
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -22,6 +22,7 @@ const {
|
|||||||
maskStrokeWidth = 1,
|
maskStrokeWidth = 1,
|
||||||
pannable = false,
|
pannable = false,
|
||||||
zoomable = false,
|
zoomable = false,
|
||||||
|
ariaLabel = 'Vue Flow mini map',
|
||||||
} = defineProps<MiniMapProps>()
|
} = defineProps<MiniMapProps>()
|
||||||
|
|
||||||
const emit = defineEmits(['click', 'nodeClick', 'nodeDblclick', 'nodeMouseenter', 'nodeMousemove', 'nodeMouseleave'])
|
const emit = defineEmits(['click', 'nodeClick', 'nodeDblclick', 'nodeMouseenter', 'nodeMousemove', 'nodeMouseleave'])
|
||||||
@@ -204,7 +205,7 @@ export default {
|
|||||||
:aria-labelledby="`vue-flow__minimap-${id}`"
|
:aria-labelledby="`vue-flow__minimap-${id}`"
|
||||||
@click="onSvgClick"
|
@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
|
<MiniMapNode
|
||||||
v-for="node of nodes"
|
v-for="node of nodes"
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ export interface MiniMapProps {
|
|||||||
width?: number
|
width?: number
|
||||||
|
|
||||||
height?: number
|
height?: number
|
||||||
|
|
||||||
|
ariaLabel?: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/** these props are passed to mini map node slots */
|
/** these props are passed to mini map node slots */
|
||||||
|
|||||||
Reference in New Issue
Block a user