chore: remove null check
This commit is contained in:
@@ -198,7 +198,7 @@ export function EdgeWrapper<EdgeType extends Edge = Edge>({
|
||||
onMouseLeave={onEdgeMouseLeave}
|
||||
onKeyDown={isFocusable ? onKeyDown : undefined}
|
||||
tabIndex={isFocusable ? 0 : undefined}
|
||||
role={edge.ariaRole === null ? undefined : edge.ariaRole || (isFocusable ? 'group' : 'img')}
|
||||
role={edge.ariaRole ?? (isFocusable ? 'group' : 'img')}
|
||||
aria-roledescription={edge.ariaRoleDescription || 'edge'}
|
||||
data-id={id}
|
||||
data-testid={`rf__edge-${id}`}
|
||||
|
||||
@@ -191,7 +191,7 @@ export function NodeWrapper<NodeType extends Node>({
|
||||
onDoubleClick={onDoubleClickHandler}
|
||||
onKeyDown={isFocusable ? onKeyDown : undefined}
|
||||
tabIndex={isFocusable ? 0 : undefined}
|
||||
role={node.ariaRole === null ? undefined : node.ariaRole || (isFocusable ? 'group' : undefined)}
|
||||
role={node.ariaRole ?? (isFocusable ? 'group' : undefined)}
|
||||
aria-roledescription={node.ariaRoleDescription || 'node'}
|
||||
aria-describedby={disableKeyboardA11y ? undefined : `${ARIA_NODE_DESC_KEY}-${rfId}`}
|
||||
aria-label={node.ariaLabel}
|
||||
|
||||
@@ -137,7 +137,7 @@
|
||||
? ariaLabel
|
||||
: `Edge from ${source} to ${target}`}
|
||||
aria-describedby={focusable ? `${ARIA_EDGE_DESC_KEY}-${store.flowId}` : undefined}
|
||||
role={edge.ariaRole === null ? undefined : edge.ariaRole || (focusable ? 'group' : 'img')}
|
||||
role={edge.ariaRole ?? (focusable ? 'group' : 'img')}
|
||||
aria-roledescription={edge.ariaRoleDescription || 'edge'}
|
||||
onkeydown={focusable ? onkeydown : undefined}
|
||||
tabindex={focusable ? 0 : undefined}
|
||||
|
||||
@@ -252,7 +252,7 @@
|
||||
: undefined}
|
||||
onkeydown={focusable ? onKeyDown : undefined}
|
||||
tabIndex={focusable ? 0 : undefined}
|
||||
role={node.ariaRole === null ? undefined : node.ariaRole || (focusable ? 'group' : undefined)}
|
||||
role={node.ariaRole ?? (focusable ? 'group' : undefined)}
|
||||
aria-roledescription={node.ariaRoleDescription || 'node'}
|
||||
aria-describedby={store.disableKeyboardA11y
|
||||
? undefined
|
||||
|
||||
Reference in New Issue
Block a user