Skip to content

Commit

Permalink
Add role and aria-label to arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
midudev committed Apr 8, 2020
1 parent 0a74a24 commit 493e830
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/react-slidy-slider.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,17 @@ export default function ReactSlidySlider({
{showArrows && (
<>
<span
arial-label="Previous"
className={`${classNameBase}-prev`}
role="button"
disabled={index === 0}
onClick={handlePrev}
/>
<span
arial-label="Next"
className={`${classNameBase}-next`}
disabled={items.length <= numOfSlides || index === items.length - 1}
role="button"
onClick={handleNext}
/>
</>
Expand Down

0 comments on commit 493e830

Please sign in to comment.