GithubHelp home page GithubHelp logo

Comments (4)

morellodev avatar morellodev commented on May 18, 2024 1

No, the elements are mounted when your component wrapping them is rendered.

By default, all elements not in the viewport are not visible (they have visibility: hidden CSS rule set) but they do exist in the DOM – they are watched by an IntersectionObserver instance that triggers the animation when they enter the viewport.

The "issue" here is that when you jump to an element by pressing the TAB key, if that element is not visible (because, in this case, it has the rule visibility: hidden set), it won't be focusable.

I will find a fix for that keeping accessibility in mind; for now, a temporary workaround could be setting the triggerOnce prop so that you can focus elements once the animations have been run.

from react-awesome-reveal.

morellodev avatar morellodev commented on May 18, 2024

Hi @VGamezz19,

thank you for appreciating the library!

I tried to reproduce your code (without the translation library), and I have no issue at all:

<Fade direction="bottom">
  <h2 tabIndex="1" className="explore-the-future-of-data__title">
     A<br />B
   </h2>
 </Fade>
 <Fade direction="left" cascade>
   <h3 tabIndex="2" className="explore-the-future-of-data__subtitle">C</h3>
   <p tabIndex="3">D</p>
   <p tabIndex="4">E</p>
</Fade>

react-awesome-reveal-tabindex

The only things I see is that I start indexing tabIndexes from 1 and not from 0, and that you wrote a wrong sequence of attributes tabIndex="0" tabIndex in the first <h2> tag.

Let me know if it helps, so I can close the issue.

from react-awesome-reveal.

VGamezz19 avatar VGamezz19 commented on May 18, 2024

yep! sorry I just explain it wrong. Those items are out of boundary (i miss explain this important point hehe) and u need to scroll down to see the elements.
So they still hidden before I press Tab.

I can realise that those elements dosen't exist before i Tab...

from react-awesome-reveal.

morellodev avatar morellodev commented on May 18, 2024

@VGamezz19 please update to version 2.4.2.

from react-awesome-reveal.

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.