File Tree Browser: UX and accessibility review for file title button interaction pattern
## Summary The File Tree Browser (FTB) currently implements two separate `<button>` elements for directory rows: 1. A chevron button for expanding/collapsing directories 2. A file title button for navigation This implementation was chosen to follow accessibility best practices (interactive elements should not be nested), as discussed in the kickoff for #577191. **Related discussions:** - MR !212108 [note](https://gitlab.com/gitlab-org/gitlab/-/merge_requests/212108#note_2890840854) - Issue #577191 [kickoff notes](https://gitlab.com/gitlab-org/gitlab/-/issues/577191#note_2840020131) - MR !210274 ## Questions for UX and Accessibility Should keyboard interactions (Space, Enter) and mouse click on already expanded directory file title button collapse the directory? ## Current Behaviour | | Space Key | Enter Key | Mouse Click | |--|-----------|-----------|-------------| | Chevron button | Expands/collapses directory (does not navigate) | Expands/collapses directory (does not navigate) | Expands/collapses directory (does not navigate) | | File title button | Navigates to directory and expand (if the directory is not opened yet) | Navigates to directory and expand (if the directory is not opened yet) | Navigates to directory and expand (if the directory is not opened yet) |
issue