chore: make labelConfig items required, update description text
This commit is contained in:
@@ -144,12 +144,11 @@ export function NodeWrapper<NodeType extends Node>({
|
||||
event.preventDefault();
|
||||
|
||||
store.setState({
|
||||
ariaLiveMessage:
|
||||
labelConfig['a11yDescription.ariaLiveMessage']?.(
|
||||
event.key.replace('Arrow', '').toLowerCase(),
|
||||
~~internals.positionAbsolute.x,
|
||||
~~internals.positionAbsolute.y
|
||||
) || '',
|
||||
ariaLiveMessage: labelConfig['a11yDescription.ariaLiveMessage'](
|
||||
event.key.replace('Arrow', '').toLowerCase(),
|
||||
~~internals.positionAbsolute.x,
|
||||
~~internals.positionAbsolute.y
|
||||
),
|
||||
});
|
||||
|
||||
moveSelectedNodes({
|
||||
|
||||
@@ -668,8 +668,8 @@ export interface ReactFlowProps<NodeType extends Node = Node, EdgeType extends E
|
||||
*/
|
||||
debug?: boolean;
|
||||
/**
|
||||
* Custom accessibility messages for screen readers and a11y features.
|
||||
* Allows localization and customization of ARIA descriptions.
|
||||
* Configuration for customizable labels, descriptions, and UI text. Provided keys will override the corresponding defaults.
|
||||
* Allows localization, customization of ARIA descriptions, control labels, minimap labels, and other UI strings.
|
||||
*/
|
||||
labelConfig?: LabelConfig;
|
||||
labelConfig?: Partial<LabelConfig>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user