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