chore(Minimap): add custom aria label for SF and RF
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
|
||||
let {
|
||||
position = 'bottom-right',
|
||||
ariaLabel = 'Mini map',
|
||||
ariaLabel,
|
||||
nodeStrokeColor = 'transparent',
|
||||
nodeColor,
|
||||
nodeClass = '',
|
||||
@@ -42,6 +42,7 @@
|
||||
}: MiniMapProps = $props();
|
||||
|
||||
let store = $derived(useStore());
|
||||
let labelConfig = $derived(store.labelConfig);
|
||||
|
||||
const nodeColorFunc = nodeColor === undefined ? undefined : getAttrFunction(nodeColor);
|
||||
const nodeStrokeColorFunc = getAttrFunction(nodeStrokeColor);
|
||||
@@ -113,7 +114,9 @@
|
||||
zoomable
|
||||
}}
|
||||
>
|
||||
{#if ariaLabel}<title id={labelledBy}>{ariaLabel}</title>{/if}
|
||||
{#if ariaLabel ?? labelConfig['minimap.ariaLabel']}
|
||||
<title id={labelledBy}>{ariaLabel ?? labelConfig['minimap.ariaLabel']}</title>
|
||||
{/if}
|
||||
|
||||
{#each store.nodes as userNode (userNode.id)}
|
||||
{@const node = store.nodeLookup.get(userNode.id)}
|
||||
|
||||
Reference in New Issue
Block a user