E-mail List Archives
Re: Having an application element gain focus when the pageloads?
From: Tim Harshbarger
Date: Mar 13, 2018 10:04AM
- Next message: glen walker: "Re: aria-disabled is really required"
- Previous message: Wolfgang Berndorfer: "Re: Having an application element gain focus when the pageloads?"
- Next message in Thread: None
- Previous message in Thread: Wolfgang Berndorfer: "Re: Having an application element gain focus when the pageloads?"
- View all messages in this Thread
I would only use autofocus for elements that can receive keyboard focus and that I want to be part of the normal tab order.
I would only use tabindex="-1" if I wanted to be able to move focus to the element with javascript, but I didn't want it to be part of the normal tab order.
So autofocus would probably be the better choice if you were wanting to move keyboard focus to a specific button or field in a modal. You would only put tabindex="-1" on the div for the modal if you wanted keyboard focus to be moved there when the modal opens.
I am not sure if I explained that well.
Thanks,
Tim
- Next message: glen walker: "Re: aria-disabled is really required"
- Previous message: Wolfgang Berndorfer: "Re: Having an application element gain focus when the pageloads?"
- Next message in Thread: None
- Previous message in Thread: Wolfgang Berndorfer: "Re: Having an application element gain focus when the pageloads?"
- View all messages in this Thread