feat(nodes-edges): add domAttributes

This commit is contained in:
moklick
2025-06-05 15:41:44 +02:00
parent 3e6bcf51e3
commit 09458f52ff
12 changed files with 56 additions and 19 deletions
@@ -138,9 +138,10 @@
: `Edge from ${source} to ${target}`}
aria-describedby={focusable ? `${ARIA_EDGE_DESC_KEY}-${store.flowId}` : undefined}
role={edge.ariaRole ?? (focusable ? 'group' : 'img')}
aria-roledescription={edge.ariaRoleDescription || 'edge'}
aria-roledescription={edge.domAttributes?.['aria-roledescription'] || 'edge'}
onkeydown={focusable ? onkeydown : undefined}
tabindex={focusable ? 0 : undefined}
{...edge.domAttributes}
>
<EdgeComponent
{id}
@@ -254,10 +254,11 @@
onkeydown={focusable ? onKeyDown : undefined}
tabIndex={focusable ? 0 : undefined}
role={node.ariaRole ?? (focusable ? 'group' : undefined)}
aria-roledescription={node.ariaRoleDescription || 'node'}
aria-roledescription={node.domAttributes?.['aria-roledescription'] || 'node'}
aria-describedby={store.disableKeyboardA11y
? undefined
: `${ARIA_NODE_DESC_KEY}-${store.flowId}`}
{...node.domAttributes}
>
<NodeComponent
{data}