chore: add roles to edges

This commit is contained in:
Abbey Yacoe
2025-06-03 11:48:06 +02:00
parent 848b486b22
commit 9f82b15d58
6 changed files with 32 additions and 16 deletions
@@ -137,7 +137,8 @@
? ariaLabel
: `Edge from ${source} to ${target}`}
aria-describedby={focusable ? `${ARIA_EDGE_DESC_KEY}-${store.flowId}` : undefined}
role={focusable ? 'button' : 'img'}
role={edge.ariaRole === null ? undefined : edge.ariaRole || (focusable ? 'group' : 'img')}
aria-roledescription={edge.ariaRoleDescription || 'edge'}
onkeydown={focusable ? onkeydown : undefined}
tabindex={focusable ? 0 : undefined}
>