Chat: Fix a11y issues mentioned in CAS-356
Copied from Jira-Issue CAS-356:
After CAS-70 there are still some a11y-issues left that need to be addressed. Below is a list of issues that were found while testing.
Sticky Mode:
- when having no active chat, i.e. the chat list is empty, returning from 'All channels' and co. loses focus completely
Window mode:
- when there are no channels or you have joined them all (thus having no 'Join' buttons to navigate to), tabbing from the right panel loses focus completely, see below (1)
- the select/focus behavior in the chat list is weird (inconsistent blue/grey background color for selected chats) which might be caused by auto focusing the Message field when opening a chat Tabindex and focus should be fixed
- 'More actions' dropdown is not navigable with arrow keys
Other:
- the 'All files' panel can't be used with keyboard at all
- switching from window mode to sticky mode loses focus completely
- might be intended: switching from sticky mode to window mode focuses the window TBD (1)
- cancelling the modal dialogs for creating chats loses focus completely
- (1) when opening 'All Channels' and co., the lines with "a11y.getTabbable(this.$rightside)" don't work, since this won't wait for the loading to be finished. This results in focusing unwanted elements: instead of the first item (like first file, channel...) in sticky mode 'New Chat' is focused. In window mode this can result in focusing the scrollpane with tabindex="-1"
- there is inconsistent select/focus behavior for the chat list, especially noticeable in sticky mode (create new chat -> return... etc.)