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 5, 2024
1 parent 8afce2f commit 5eb49d0
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,6 @@ function lazyLabelLookup(node: TreeNode) {
).value;
}
}
// Factored out because of vue-tsc problems inside the pt object
const ptNodeContent = ({ instance }: TreePassThroughMethodOptions) => {
if (instance.$el && instance.node.key === movingItem.value?.key) {
instance.$el.classList.add("is-adjusting-parent");
}
return { style: { height: "4rem" } };
};
</script>

<template>
Expand Down Expand Up @@ -292,7 +284,15 @@ const ptNodeContent = ({ instance }: TreePassThroughMethodOptions) => {
},
},
container: { style: { fontSize: '1.4rem' } },
nodeContent: ptNodeContent,
nodeContent: ({ instance }: TreePassThroughMethodOptions) => {
if (instance.$el && instance.node.key === movingItem?.key) {
instance.$el.classList.add('is-adjusting-parent');
}
return { style: { height: '4rem' } };
},
nodeIcon: ({ instance }: TreePassThroughMethodOptions) => {
return { ariaLabel: instance.node.iconLabel };
},
nodeLabel: {
style: {
textWrap: 'nowrap',
Expand Down

0 comments on commit 5eb49d0

Please sign in to comment.