-
Notifications
You must be signed in to change notification settings - Fork 198
react-a11y-image-button-has-alt toLowerCase error throws #390
Comments
I've been seeing this too: sist output: shell
node
ruby
go
Time created: Fri Sep 01 2017 07:59:54 GMT-0400 (EDT) |
okay it looks like this is the code responsible for the error:
when i removed the role attribute the error went away |
@willisplummer perhaps this rule is calling |
seems like the FWIW I was a little confused. I actually arrived at this issue because I was seeing the same error from the |
@willisplummer I tried adding a failing test of your Here's the simplified component I ran the tests with. That should cause a failure with the it('when img element has non-string alt text.', (): void => {
const script: string = `
import React = require('react');
const altText = 3;
const a = <input type='image' alt={altText} />;
`;
TestHelper.assertNoViolation(ruleName, script);
}); |
Poked around a bunch, not happy with my abilities to debug. Would <3 help from someone at Microsoft on this one. Pretty confident that replacing |
Only upon enabling
"react-a11y-image-button-has-alt"
with a value oftrue
in ourtslint.json
do we begin seeing this issue. Can verify that other rules fromtslint-microsoft-contrib
are passing successfully in our codebase.sist output:
node
npm -v
: 5.4.0node --version
: v8.4.0shell
uname
: Darwinecho $SHELL
: /bin/zshecho $TERM
: xterm-256color-italicecho $TERM_PROGRAM
: iTerm.appTime created: Mon Aug 28 2017 16:55:50 GMT-0700 (PDT)
The text was updated successfully, but these errors were encountered: