GithubHelp home page GithubHelp logo

Comments (3)

erin-doyle avatar erin-doyle commented on June 15, 2024

Yes this does look like a bug. It looks like the "The img does not have an alt prop..." rule is not checking for role="presentation". We can look into this.

from react-a11y.

JayaKrishnaNamburu avatar JayaKrishnaNamburu commented on June 15, 2024

Hi, I tried replicating the same but the rule is working fine when we just specify the role and alt like below
<img src={logo} className="App-logo" alt="" role="Testing bug" /> throwing this warning in terminal
Elements with ARIA roles must use a valid, non-abstract ARIA role jsx-a11y/aria-role

But when we pass the props using an object as below
let allyProps = {}; allyProps.alt = ''; allyProps.role = 'dsfkdsf';

<img src={logo} className="App-logo" {...allyProps} /> then it throws the following warning

img elements must have an alt prop, either with meaningful text, or an empty string for decorative images jsx-a11y/alt-text

But the DOM elements looks same in both the scenarios

screenshot 2019-02-15 at 2 21 55 pm

from react-a11y.

jmk-198xtsuga avatar jmk-198xtsuga commented on June 15, 2024

EDIT: I just looked back over to the Readme for react-a11y to see the deprecation notice, will not pursue this issue.
I'm down to explore this issue, I'll test it out to see if it still exists, and if so, get digging on why the warning is getting thrown

from react-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.