feat(nodes-edges): add domAttributes
This commit is contained in:
@@ -199,7 +199,7 @@ export function EdgeWrapper<EdgeType extends Edge = Edge>({
|
||||
onKeyDown={isFocusable ? onKeyDown : undefined}
|
||||
tabIndex={isFocusable ? 0 : undefined}
|
||||
role={edge.ariaRole ?? (isFocusable ? 'group' : 'img')}
|
||||
aria-roledescription={edge.ariaRoleDescription || 'edge'}
|
||||
aria-roledescription={edge.domAttributes?.['aria-roledescription'] || 'edge'}
|
||||
data-id={id}
|
||||
data-testid={`rf__edge-${id}`}
|
||||
aria-label={
|
||||
@@ -207,6 +207,7 @@ export function EdgeWrapper<EdgeType extends Edge = Edge>({
|
||||
}
|
||||
aria-describedby={isFocusable ? `${ARIA_EDGE_DESC_KEY}-${rfId}` : undefined}
|
||||
ref={edgeRef}
|
||||
{...edge.domAttributes}
|
||||
>
|
||||
{!reconnecting && (
|
||||
<EdgeComponent
|
||||
|
||||
@@ -196,9 +196,10 @@ export function NodeWrapper<NodeType extends Node>({
|
||||
onKeyDown={isFocusable ? onKeyDown : undefined}
|
||||
tabIndex={isFocusable ? 0 : undefined}
|
||||
role={node.ariaRole ?? (isFocusable ? 'group' : undefined)}
|
||||
aria-roledescription={node.ariaRoleDescription || 'node'}
|
||||
aria-roledescription={node.domAttributes?.['aria-roledescription'] || 'node'}
|
||||
aria-describedby={disableKeyboardA11y ? undefined : `${ARIA_NODE_DESC_KEY}-${rfId}`}
|
||||
aria-label={node.ariaLabel}
|
||||
{...node.domAttributes}
|
||||
>
|
||||
<Provider value={id}>
|
||||
<NodeComponent
|
||||
|
||||
Reference in New Issue
Block a user