Skip to content
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

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

kolumb
Copy link
Contributor

@kolumb kolumb commented Mar 4, 2021

Fixes first two points of #11
[update] Also added tabindex to rooms list

src/client/components/RoomSelector.jsx Outdated Show resolved Hide resolved
@@ -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 ? (() => {
Copy link
Owner

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 ?

Copy link
Contributor Author

@kolumb kolumb Mar 14, 2021

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..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants