0

Using marquee HTML tag in React JS Project the line of code is below:

<marquee behavior="scroll" direction="left" scrollamount="5">
    My Text scrolling Right to Left Here
</marquee>

But why did the terminal give this warning below:

Warning: Do not use elements as they can create visual accessibility issues and are deprecated jsx-a11y/no-distracting-elements

Drew Reese
  • 165,259
  • 14
  • 153
  • 181
  • 1
    Because it's an accessibility issue. https://stackoverflow.com/questions/31951282/why-is-marquee-deprecated-and-what-is-the-best-alternative OFC, you could adjust/disable the linter for that rule https://github.com/jsx-eslint/eslint-plugin-jsx-a11y/blob/main/docs/rules/no-distracting-elements.md, but why? It goes against best practices. – Drew Reese Feb 24 '22 at 21:02
  • 1
    marquee elements has been long dead. use css transition to create your moving animation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/marquee – Semi-Friends Feb 24 '22 at 21:05
  • 1
    it's obselete... – Someone Special Feb 24 '22 at 21:05
  • Now, I am not going to use marquee HTML tag **Deprecated:** This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant **web standards**, maybe in the process of being dropped, or may only be kept for compatibility purposes. **Avoid using it**, and update existing code if possible; ** Be aware that this feature may cease to work at any time.** Thank you – Touhid Alam Feb 24 '22 at 21:20

0 Answers0