chore: add handle aria-label
This commit is contained in:
@@ -44,6 +44,8 @@
|
||||
);
|
||||
|
||||
let store = useStore();
|
||||
let labelConfig = $derived(store.labelConfig);
|
||||
|
||||
|
||||
let prevConnections: Map<string, HandleConnection> | null = null;
|
||||
$effect.pre(() => {
|
||||
@@ -227,6 +229,7 @@ The Handle component is the part of a node that can be used to connect nodes.
|
||||
onkeypress={() => {}}
|
||||
{style}
|
||||
role="button"
|
||||
aria-label={labelConfig[`handle.ariaLabel`]}
|
||||
tabindex="-1"
|
||||
{...rest}
|
||||
>
|
||||
|
||||
@@ -56,6 +56,9 @@ export const defaultLabelConfig = {
|
||||
|
||||
// Mini map
|
||||
'minimap.ariaLabel': 'Mini Map',
|
||||
|
||||
// Handle
|
||||
'handle.ariaLabel': 'Handle',
|
||||
};
|
||||
|
||||
export type LabelConfig = Required<typeof defaultLabelConfig>;
|
||||
|
||||
Reference in New Issue
Block a user