DuoChat: check accessibility of slash commands
Background
From this MR comment:
I'm wondering about the a11y implications of the way we track activeIndex here in this component and also up in the main GlDuoChat component this implementation is based on. We're not managing actual focus state of the items, since the focus stays in the input. Should we be announcing selections changing?
Problem to solve
The DuoChat component has some custom selection logic for slash commands, where the users focus stays inside the main prompt input, but pressing arrow keys allows scrolling through the slash commands.
We should verify how this functionality works for screenreader users. Since we only visually highlight the selected command, and don't actually move focus to the commands button element, it may be difficult for these users to see/understand what is happening.
Proposed solution
First, test and verify on some different screenreaders that this is in fact a problem.
If so, we could consider an aria-live region to announce selections as you scroll through them, or see what the UX impact would be of changing to one of our standard gitlab/ui components