primereact
primereact copied to clipboard
fix Tree keyboard navigation when item expands #8066
According to my understanding, the ARIA requirements say that, when the node is closed, pressing RIGHT should open the children, but not change focus.
Currently, pressing RIGHT open the children and changes focus to the first child.
Fix #8066
Generated:
This pull request modifies the behavior of the onArrowRight function in the UITreeNode component to improve handling of tree node expansion.
Key changes in tree node behavior:
components/lib/tree/UITreeNode.js: Updated theonArrowRightfunction to ensure that theexpandmethod respects the currentexpandedstate, and removed the condition that checked forexpandedbefore returning early.
PrimeReact is doing the same as PrimeVue: https://primevue.org/tree/#accessibility