fix(a11y/chat sidebar) remove autofocus behavior

the autofocus can seem helpful but it can be cumbersome, especially for
screen reader users:

- it prevents the user to discover the UI normally. Here i'm teleported
at the bottom of the sidebar, and I have to go try to discover things by
myself to understand there are two tabs above.

- If I want to read the chat content, each time I open the chat, i'll
have to go back in the chat content, before I get focused after the
content.

- same thing for polls: if I just want to read the content, each time
I'll have to go back in the navigation.

So I'm thinking maybe just don't do anything special with focus. Maybe
we could focus the sidebar title automatically when we open it. But
focusing something that makes you miss loads of info before seems too
problematic to me.
This commit is contained in:
Emmanuel Pelletier 2023-03-02 17:35:39 +01:00
parent 9c3e565f41
commit 889a63e382
2 changed files with 0 additions and 2 deletions

View File

@ -115,7 +115,6 @@ class ChatInput extends Component<IProps, IState> {
</div>
)}
<Input
autoFocus = { true }
className = 'chat-input'
icon = { this.props._areSmileysDisabled ? undefined : IconFaceSmile }
iconClick = { this._toggleSmileysPanel }

View File

@ -40,7 +40,6 @@ const PollsPane = ({ createMode, onCreate, setCreateMode, t }: AbstractProps) =>
<div className = { classes.footer }>
<Button
accessibilityLabel = { t('polls.create.create') }
autoFocus = { true }
fullWidth = { true }
labelKey = { 'polls.create.create' }
onClick = { onCreate } />