mattermost
mattermost copied to clipboard
Focus the first message in the rhs when recent mentions, flagged or pinned posts are opened via the keyboard
Repro: Use the keyboard to navigate to the Recent Mentions button (or pinned posts, or flagged posts, or execute a search), hit Enter.
Observed: Focus is not moved to the first message in the pane
Expected: Focus is moved to the first message in the recent mentions list (similar to if the user hit F6 three times to navigate to the "complimentary region")
If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.
New contributors please see our Developer's Guide.
JIRA: https://mattermost.atlassian.net/browse/MM-25148
I can give it a try on this @amyblais @hmhealey
@esethna I am trying to reproduce this. I would like to clarify one point.
When I use keyboard to select Recent Mentions
and hit enter, as mentioned in the issue, first message is not focused. However I also see the same behavior, when I click Recent Mentions
with mouse (again no focus).
The expectation in this ticket is that to create a different behavior and focus the first message when user navigates using keyboard and selects Recent Mentions
or Saved Posts
or Pinned Posts
. Is my understanding correct?
@sinansonmez correct. If navigating with the keyboard we would expect to see the focus effect on the first message in the pane.
When using the mouse we do not expect to see this effect
@esethna thanks for the clarification.
I spent some time on this to figure out the implementation. Unfortunately I couldnt find an easy solutions (at least not visible to me). I could see that accessibility is mainly managed by this file
The question: Is there any similar implementation in the codebase so I can check and try to implement it here as well? If not, could someone provide some guidance on how to implement this feature?
I'm not sure if we have any other good examples of doing something like this, but what if we just always focused that element when one of those views is opened? I'd hope that the A11yController would recognize that the focus changed and apply the correct effect since, even though the focus was changed programatically, I don't think that would stop it from adding the extra highlighting. When clicking on the button to open one of those views, it'd still change the focus, but it shouldn't apply the extra highlighting because the A11yController isn't active
Thanks @hmhealey for the suggestion. I tried to implement your proposal but unfortunately no luck. Here is my branch. Anything else comes to your mind that can fix the issue?
I am unassigning myself as I couldn't have more progress on this. Maybe someone else could tackle it.
sinansonmez i want to try keep your progress, is the problem in the server or the frontend code?
@LuizArnoldChavezBurgos It should be on the front end