Comments (3)
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.
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
from react-a11y.
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)
- Uncaught TypeError: ReactDOM.findDOMNode is not a function HOT 1
- Configuration for rule "jsx-a11y/label-has-for" is invalid: Value "label" should be object. HOT 2
- jsx-a11y/label-has-for never correct HOT 1
- Is there a way to limit duplicated warnings?
- Using react-a11y with Styled-Components
- React version compatibility HOT 6
- Using a11y with preact and preact-cli HOT 2
- avoid-positive-tabindex error HOT 2
- When I report with severity error, I get JSON serialization errors for the DOM node HOT 1
- Example of the reporter option HOT 1
- Broken, outdated external links HOT 1
- no-positive-index and aria-role rules warn/error when passing undefined as props for role and tabIndex HOT 5
- Level of conformity HOT 2
- click-events-have-key-events fails even if element is interactive
- hello HOT 1
- Link in deprecation warning to react-axe is to another deprecated page.
- readme says it's deprecated, but the npm package is not deprecated
- Issue 1
- Is react-a11y supported in React 18? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-a11y.