Skip to content

Commit

Permalink
fix(accessibility): fixed accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ruddenchaux committed Apr 18, 2021
1 parent 4ec5c03 commit a164f08
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/components/characters/CharacterCardFirstSeenIn.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function CharacterCardFirstSeenIn({
<Typography variant="subtitle2" component="label" color="textSecondary">
First seen in:
</Typography>
<Typography variant="subtitle1" data-cy="character-first-seen-in">
<Typography variant="subtitle1" component="div" data-cy="character-first-seen-in">
{character.episode[0].name}
</Typography>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/characters/CharacterCardLastLocation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export default function CharacterCardLastLocation({
<Typography variant="subtitle2" component="label" color="textSecondary">
Last known location:
</Typography>
<Typography variant="subtitle1" data-cy="character-last-known-position">
<Typography variant="subtitle1" component="div" data-cy="character-last-known-position">
{character.location.name}
</Typography>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/characters/CharacterCardTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export default function CharacterCardTitle({ character, isLoading }: { character
<Typography className={classes.ellipsis} component="h2" variant="h5" data-cy="character-name">
{character.name}
</Typography>
<Typography variant="subtitle2" data-cy="character-status-species">
<Typography variant="subtitle2" component="span" data-cy="character-status-species">
{character.status} - {character.species}
</Typography>
</Grid>
Expand Down
8 changes: 7 additions & 1 deletion src/components/characters/CharactersFullScreenDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,17 @@ export default function CharactersFullScreenDialog() {
scroll="paper"
open={open || false}
onClose={handleClose}
role="presentation"
TransitionComponent={Transition as React.ComponentType<TransitionProps>}
>
<AppBar className={classes.appBar}>
<Toolbar>
<Typography data-cy="characters-fullscreen-dialog-title" variant="h6" className={classes.title}>
<Typography
data-cy="characters-fullscreen-dialog-title"
variant="h6"
component="span"
className={classes.title}
>
{title}
</Typography>
<IconButton
Expand Down
2 changes: 1 addition & 1 deletion src/components/episodes/EpisodeCardAirDate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function EpisodeCardAirDate({ episode, isLoading }: { episode: Ep
<Typography variant="subtitle2" component="label" color="textSecondary">
Air date:
</Typography>
<Typography variant="subtitle1" data-cy="episode-air-date">
<Typography variant="subtitle1" component="div" data-cy="episode-air-date">
{episode.air_date}
</Typography>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/episodes/EpisodeCardEpisode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default function EpisodeCardEpisode({ episode, isLoading }: { episode: Ep
<Typography variant="subtitle2" component="label" color="textSecondary">
Episode:
</Typography>
<Typography variant="subtitle1" data-cy="episode-episode">
<Typography variant="subtitle1" component="div" data-cy="episode-episode">
{episode.episode}
</Typography>
</div>
Expand Down

0 comments on commit a164f08

Please sign in to comment.