Skip to content

Commit

Permalink
Set aria-label on tree node icons
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls committed Dec 3, 2024
1 parent 15c0cb8 commit 81ab972
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -264,6 +268,9 @@ await initializeTree();
style: { top: '30%' },
},
},
nodeIcon: ({ instance }: TreePassThroughMethodOptions) => {
return { ariaLabel: instance.node.iconLabel };
},
nodeLabel: {
style: { textWrap: 'nowrap' },
},
Expand Down

0 comments on commit 81ab972

Please sign in to comment.