feat(core,nodes): implement a11y in nodes

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-20 00:38:56 +01:00
committed by Braks
parent 0267b2f19e
commit 9f50dd0865
17 changed files with 167 additions and 35 deletions
+9
View File
@@ -1,4 +1,13 @@
import type { XYPosition } from '~/types'
export const ARIA_NODE_DESC_KEY = 'vue-flow__node-desc'
export const ARIA_EDGE_DESC_KEY = 'vue-flow__edge-desc'
export const elementSelectionKeys = ['Enter', ' ', 'Escape']
export const arrowKeyDiffs: Record<string, XYPosition> = {
ArrowUp: { x: 0, y: -1 },
ArrowDown: { x: 0, y: 1 },
ArrowLeft: { x: -1, y: 0 },
ArrowRight: { x: 1, y: 0 },
}