chore(Minimap): add custom aria label for SF and RF

This commit is contained in:
Abbey Yacoe
2025-05-22 12:16:37 +02:00
parent 48c5467851
commit 3c421d5f02
5 changed files with 20 additions and 6 deletions
@@ -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)}