-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
tabIndex cannot be dynamic #50
Comments
@timtyrrell we can't see your example - can you enclose it in single or triple backticks? |
Doh, my bad. Like if I am building a list of links, I want to send in a different index to each. I am new at the a11y stuff so tell me if I am off-base.
|
well, you're passing the return value of |
I am sorry to distract you, that was a totally fake part, I was only focused on the tabIndex piece:
|
It is checking for a number, I just wondered if anyone had thoughts on if I am handling anything incorrectly https://github.com/evcohen/eslint-plugin-jsx-a11y/blob/master/src/rules/onclick-has-focus.js#L34 |
you're right, it shouldn't warn in that case. fixing now, thanks! |
This is fixed in v1.2.3 |
@evcohen Sorry for the late "thanks!". On my todo list to check out still |
It is seems really unfortunate that you can't pass a tabIndex in as a parameter to an element, like:
<a onClick={ something() } tabIndex={ dynamicIndex } />
This triggers the "onclick-has-focus" rule. Do you have any thoughts on that?
The text was updated successfully, but these errors were encountered: