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,
|
||||
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"
|
||||
|
||||
@@ -36,6 +36,8 @@ export interface MiniMapProps {
|
||||
width?: number
|
||||
|
||||
height?: number
|
||||
|
||||
ariaLabel?: string | null
|
||||
}
|
||||
|
||||
/** these props are passed to mini map node slots */
|
||||
|
||||
Reference in New Issue
Block a user