Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

180
Views
How to Set the tabindex on a Javascript Slider

I'm trying to set the tabindex on the arrows associated with a slider like this one, but the arrows get skipped when using tab to move from one element on the web page to the next. I tried this ...

    <a class="prev" onclick="plusSlides(-1).tabIndex = '3'">❮</a>
    <a class="next" onclick="plusSlides(1).tabIndex = '4'">❯</a>

... without success. Maybe the tabIndex property requires that all elements are labeled w/ tabIndex for it to function? IDK.

Any thoughts / comments on how to implement this are welcome.

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

<a class="prev" onclick="plusSlides(-1,3)">❮</a>
<a class="next" onclick="plusSlides(1,4)">❯</a>

function plusSlides(n,index) {
  showSlides(index += n);
}

function currentSlide(n,index) {
  showSlides(index = n);
}

send index in side function

about 4 years ago · Juan Pablo Isaza Report

0

I found an answer here. The slider's arrows are traversable w/ the keyboard's tab key when the tabindex is set as follows:

    <a class="prev" id="previd" tabindex="0" onclick="plusSlides(-1)">❮</a>
    <a class="next" id="nextid" tabindex="0" onclick="plusSlides(1)">❯</a>
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!