This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 199
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#414 fix type error in react-ally-img-has-alt rule
Add warning throwing test for undefined roles Coerce possibly undefined role attribute to string closes #414 closes #390 closes #410
- Loading branch information
Showing
3 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
...faltTests/PassingTestInputs/ImgElementHasNonEmptyAltValueAndUndefinedPresentationRole.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import React = require('react'); | ||
|
||
let validAltValue; | ||
const a = <img role={undefined} alt='validAltValue' /> | ||
const b = <img role={undefined} Alt={validAltValue} /> | ||
const c = <img role={undefined} ALT={'validAltValue'} /> | ||
const d = <img role={undefined} alt={validAltValue + 'validAltValue'} /> |