romeovs / react-a11y

Identifies accessibility issues in your React.js elements
MIT License
19 stars 5 forks source link

Repeated warnings #4

Open gf3 opened 8 years ago

gf3 commented 8 years ago

When a component is re-rendered the warnings for any child components are displayed again. This can be quite noisy (e.g. when a component is re-rendered on keyboard input). Perhaps warnings should be cached by warning type + DOM node and only displayed once?

screen shot 2016-04-25 at 9 58 50 am

romeovs commented 8 years ago

Hmm, this would actually be hard to d without also keeping information on exactly why the rule failed (eg. what values do the props have that cause the rule to fail), or we might miss some errors. This would be a big refactor (every test would need to be rewritten), so not a real priority as of yet.

From the screenshot it seems that you are re-rendering the same components over and over again, perhaps you should consider trying to reduce re-renders. Of course fixing the error or disabling the rule would be a quick way to alleviate this problem.

erin-doyle commented 7 years ago

There is a bit of a "feature" that could be considered here. The amount of noise and pain it causes when you don't meet a11y standards really motivates you to fix the issue. 😉