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