Skip to content
Snippets Groups Projects
Commit 6a787efa authored by Pierre Ecarlat's avatar Pierre Ecarlat Committed by Bastien DUMONT
Browse files

feat(a11y): Unlocked challenges focusable with keyboard

parent 61c5619a
Branches
Tags
2 merge requests!12413.1 Release,!1199feat(a11y): Unlocked challenges focusable with keyboard
...@@ -42,18 +42,20 @@ const ChallengeCard = ({ ...@@ -42,18 +42,20 @@ const ChallengeCard = ({
} }
return ( return (
// eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions <button
<div
onClick={() => moveToSlide(index)} onClick={() => moveToSlide(index)}
className={indexSlider === index ? 'slide active' : 'slide inactive'} className={indexSlider === index ? 'slide active' : 'slide inactive'}
style={{ style={{
minWidth: `${cardWidth}px`, minWidth: `${cardWidth}px`,
maxWidth: `${cardWidth}px`, maxWidth: `${cardWidth}px`,
minHeight: `${cardHeight}px`, minHeight: `${cardHeight}px`,
border: 'none',
background: 'none',
padding: 0,
}} }}
> >
{renderCard(userChallenge)} {renderCard(userChallenge)}
</div> </button>
) )
} }
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
exports[`ChallengeCard component should be rendered correctly 1`] = ` exports[`ChallengeCard component should be rendered correctly 1`] = `
<div> <div>
<div <button
class="slide active" class="slide active"
style="min-width: 200px; max-width: 200px; min-height: 400px;" style="min-width: 200px; max-width: 200px; min-height: 400px; background: none; padding: 0px;"
> >
<div <div
class="cardContent cardDone" class="cardContent cardDone"
...@@ -86,6 +86,6 @@ RUISSEAU ...@@ -86,6 +86,6 @@ RUISSEAU
</button> </button>
</div> </div>
</div> </div>
</div> </button>
</div> </div>
`; `;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment