1

I have few element in my html page which has tabIndex attribute.

Now I have a div based modal popup window opening from this page. I have few elements in this popup window which has tabIndex.

Problem: When the user presses the tab, the focus is set to each elements in the popup window, after the last element in the popup got focus and still the user press tab the focus is going to the elements in the main page which I dont want.

Is there any way to rotate the focus on elements in the popup window itself?

2
  • 1
    It's always handy to show us your markup and the script you've written so far... Commented Apr 10, 2012 at 18:17
  • "I have few element in my html page which has tabIndex attribute." - Do you have a tabIndex attribute on the HTML tag, or on the elements? Also what are the values for the tabIndex attributes (both the ones on your page and in the modal)? Or better yet, like Dan suggested, show us some sample code. Commented Apr 10, 2012 at 18:46

1 Answer 1

3

If all you need is to refocus on the first element after the last element focus is out then use Jquery's focustout() for last element and then use $('#FirstElement').focus()

I hope that helps

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.