From 81ab972bad1b35de76f3a0a604e33a706d76f525 Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Tue, 3 Dec 2024 10:46:31 -0500 Subject: [PATCH] Set aria-label on tree node icons --- .../src/arches_lingo/components/tree/ConceptTree.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/arches_lingo/src/arches_lingo/components/tree/ConceptTree.vue b/arches_lingo/src/arches_lingo/components/tree/ConceptTree.vue index f669d3b9..3b1fe00c 100644 --- a/arches_lingo/src/arches_lingo/components/tree/ConceptTree.vue +++ b/arches_lingo/src/arches_lingo/components/tree/ConceptTree.vue @@ -25,7 +25,11 @@ import TreeRow from "@/arches_lingo/components/tree/TreeRow.vue"; import type { ComponentPublicInstance, Ref } from "vue"; import type { RouteLocationNormalizedLoadedGeneric } from "vue-router"; -import type { TreeExpandedKeys, TreeSelectionKeys } from "primevue/tree"; +import type { + TreePassThroughMethodOptions, + TreeExpandedKeys, + TreeSelectionKeys, +} from "primevue/tree"; import type { TreeNode } from "primevue/treenode"; import type { Language } from "@/arches_vue_utils/types"; import type { @@ -264,6 +268,9 @@ await initializeTree(); style: { top: '30%' }, }, }, + nodeIcon: ({ instance }: TreePassThroughMethodOptions) => { + return { ariaLabel: instance.node.iconLabel }; + }, nodeLabel: { style: { textWrap: 'nowrap' }, },