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 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue #218] react-a11y-img-has-alt - image with alt should not have …
- Loading branch information
Showing
16 changed files
with
220 additions
and
93 deletions.
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
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
11 changes: 11 additions & 0 deletions
11
...tomElementTests/FailingTestInputs/CustomElementHasNonEmptyAltValueAndPresentationRole.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,11 @@ | ||
import React = require('react'); | ||
|
||
let Picture; | ||
let altValue; | ||
|
||
const a = <Picture alt='altValue' role='presentation' /> | ||
const b = <Picture alt={ 'altValue' } role={ 'presentation' } /> | ||
const c = <Picture alt={ altValue } role='Presentation' /> | ||
const d = <img alt='altValue' role='presentation button' /> | ||
const e = <img aLt='altValue' role='presentation img' /> | ||
const f = <img alt={ altValue } role='presentation' /> |
10 changes: 10 additions & 0 deletions
10
...CustomElementTests/PassingTestInputs/CustomElementHasEmptyAltValueAndPresentationRole.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,10 @@ | ||
import React = require('react'); | ||
|
||
let Picture; | ||
|
||
const a = <Picture role='presentation' alt /> | ||
const b = <Picture role={'presentation'} alt='' /> | ||
const c = <Picture role='button presentation' alt={undefined} /> | ||
const d = <img role='presentation' alt={ null } /> | ||
const e = <img role={'presentation'} alt={ '' } /> | ||
const f = <img role='button presentation' alt /> |
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
10 changes: 0 additions & 10 deletions
10
...a/a11yImgHasAlt/CustomElementTests/PassingTestInputs/CustomElementHasPresentationRole.tsx
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...TestInputs/ImgElementHasEmptyAltValue.tsx → ...asEmptyAltValueAndNotPresentationRole.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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import React = require('react'); | ||
|
||
const a = <img alt /> | ||
const a = <img alt role='button'/> | ||
const b = <img Alt='' /> | ||
const c = <img ALT={undefined} /> | ||
const d = <img alt={''} /> |
8 changes: 8 additions & 0 deletions
8
...HasAlt/DefaltTests/FailingTestInputs/ImgElementHasNonEmptyAltValueAndPresentationRole.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,8 @@ | ||
import React = require('react'); | ||
|
||
let altValue; | ||
|
||
const a = <img alt='altValue' role='presentation' /> | ||
const b = <img Alt='altValue' role='presentation button' /> | ||
const c = <img ALT={ altValue } role={ 'presentation' } /> | ||
const d = <img alt={'altValue'} role='Presentation' /> |
6 changes: 6 additions & 0 deletions
6
...ImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasEmptyAltValueAndPresentationRole.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,6 @@ | ||
import React = require('react'); | ||
|
||
const a = <img role='presentation' alt /> | ||
const b = <img role='presentation' alt='' /> | ||
const c = <img role='button presentation' alt={ undefined } /> | ||
const d = <img role={'presentation button'} alt={''} /> |
File renamed without changes.
6 changes: 0 additions & 6 deletions
6
test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementHasPresentationRole.tsx
This file was deleted.
Oops, something went wrong.
7 changes: 5 additions & 2 deletions
7
test-data/a11yImgHasAlt/DefaltTests/PassingTestInputs/ImgElementNotLowerCase.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 |
---|---|---|
@@ -1,4 +1,7 @@ | ||
import React = require('react'); | ||
|
||
const a = <img /> | ||
const b = <img alt=''/> | ||
let Img; | ||
let IMG; | ||
|
||
const a = <Img /> | ||
const b = <IMG alt=''/> |
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
Oops, something went wrong.