-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better accessibility #24
base: master
Are you sure you want to change the base?
Conversation
@@ -39,7 +39,7 @@ const RoomSelector = ({socket, joinRoom}) => { | |||
<h1>Public rooms</h1> | |||
<p>(click to join)</p> | |||
<div className="room-list"> | |||
{rooms.map(room => <div key={room.id} onClick={room.id !== currentRoomId ? (() => { | |||
{rooms.map((room, i) => <div key={room.id} tabIndex={i + 1} onClick={room.id !== currentRoomId ? (() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any reason to not just use tabIndex=0
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With tabindex=0 you have to press Shift
Tab
, not just Tab
. And you will be traversing list starting from last room. Because page starts with input field autofocus..
Fixes first two points of #11
[update] Also added tabindex to rooms list