Skip to content

Commit

Permalink
feat(project): make card component accessible
Browse files Browse the repository at this point in the history
  • Loading branch information
demmyhonore committed Apr 28, 2021
1 parent 0f57a3d commit f595117
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Card/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ function Card({
}: CardProps): JSX.Element {

return (
<div className={styles.root} onClick={onClick}>
<div className={styles.root} onClick={onClick} role="button" aria-label={`Play ${videoTitle}`}>
<div className={classNames(styles.poster, styles[posterAspectRatio])} style={{ backgroundImage: `url(${posterSource})` }}>
{videoDuration && <div className={styles.videoDurationTag}>{formatVideoDurationTag(videoDuration)}</div>}
</div>
Expand Down
2 changes: 0 additions & 2 deletions src/utils/formatting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ const formatVideoDurationTag = (seconds: number): string | void => {
const minutes = Math.ceil(seconds / 60)

return `${minutes} min`


}

export { formatVideoDurationTag }

0 comments on commit f595117

Please sign in to comment.