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

Squares should not be tab-able when matched or answered #26

Open
uriklar opened this issue May 2, 2021 · 0 comments
Open

Squares should not be tab-able when matched or answered #26

uriklar opened this issue May 2, 2021 · 0 comments

Comments

@uriklar
Copy link
Owner

uriklar commented May 2, 2021

In Square.tsx you have the Container component which has tabIndex: 0;
This makes squares accessible by tabbing. But, once the itemState is either AnswerState.Matched or AnswerState.Answered
there's no reason for them to be tab-able since the user can't interact with them.

You can make Containers attrs dynamic by having it accept props. Something like:

.attrs( props => ({ role: "button", tabIndex: props.isTabbable ? 0 : 1}))

Now, when a category is found or answered, pressing tab should skip it.

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

No branches or pull requests

1 participant