Git Product home page Git Product logo

Comments (4)

davidtheclark avatar davidtheclark commented on June 27, 2024

Yep, looks like a typical forgot-to-remember-that-zero-is-falsy accident. Thanks for pointing this out.

from tabbable.

davidtheclark avatar davidtheclark commented on June 27, 2024

πŸ€” In theory I see that there should be a possible bug here. And we should change the code regardless. But I want to make sure I'm fixing the problem you're reporting ... and I'm actually having trouble reproducing it, @straker.

I added a new test case with the following HTML:

<svg id="svg-1" height="100" width="100" tabindex="0">
  <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" />
</svg>
<svg id="svg-2" height="100" width="100" tabindex="-1">
  <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="blue" />
</svg>
<svg id="svg-3" height="100" width="100">
  <circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="green" />
</svg>

As expected, running tabbable on this case returns an array with only the first SVG β€”Β both in Chrome and in IE11. So, things actually seem to be working ok?

Could you please explain more about what the difference between expected and actual behavior is?

(Also: IE11 and maybe some Edge versions through everything off by making <svg> elements focusable by default, and you need to turn that off with focusable="false" if you want behavior to match other browsers. Maybe should document this caveat in the README, since I don't know a way around it.)

from tabbable.

straker avatar straker commented on June 27, 2024

from tabbable.

davidtheclark avatar davidtheclark commented on June 27, 2024

Ah, I see. Will fix up my test case to confirm the fix to that problem.

from tabbable.

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.