GithubHelp home page GithubHelp logo

Comments (8)

timtyrrell avatar timtyrrell commented on May 18, 2024 1

@evcohen Sorry for the late "thanks!". On my todo list to check out still

from eslint-plugin-jsx-a11y.

ljharb avatar ljharb commented on May 18, 2024

@timtyrrell we can't see your example - can you enclose it in single or triple backticks?

from eslint-plugin-jsx-a11y.

timtyrrell avatar timtyrrell commented on May 18, 2024

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.

<a onClick={ something() } tabIndex={ dynamicIndex } />

from eslint-plugin-jsx-a11y.

ljharb avatar ljharb commented on May 18, 2024

well, you're passing the return value of something to onClick, not something itself - is that return value a function?

from eslint-plugin-jsx-a11y.

timtyrrell avatar timtyrrell commented on May 18, 2024

I am sorry to distract you, that was a totally fake part, I was only focused on the tabIndex piece:

<a onClick={ handleClick } tabIndex={ dynamicIndex } />

from eslint-plugin-jsx-a11y.

timtyrrell avatar timtyrrell commented on May 18, 2024

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

from eslint-plugin-jsx-a11y.

beefancohen avatar beefancohen commented on May 18, 2024

you're right, it shouldn't warn in that case. fixing now, thanks!

from eslint-plugin-jsx-a11y.

beefancohen avatar beefancohen commented on May 18, 2024

This is fixed in v1.2.3

from eslint-plugin-jsx-a11y.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.