E-mail List Archives
Re: In-page links and programmatic focus
From: Bryan Garaventa
Date: Sep 13, 2016 12:04PM
- Next message: Brooks Newton: "WebAIM-Forum Digest, Vol 138, Issue 11"
- Previous message: Tim Harshbarger: "Re: In-page links and programmatic focus"
- Next message in Thread: None
- Previous message in Thread: Tim Harshbarger: "Re: In-page links and programmatic focus"
- View all messages in this Thread
Just to clarify, the confusion here isn't whether focus moves, but when and to which elements. Non-focusable elements cannot receive focus.
E.G If you have a same page link that points to the ID of another focusable element like a link or button, then focus will move, because these elements are natively focusable in the browser.
However, static elements like headings, span tags, etc, are not focusable in the browser. Only when the tabindex attribute is added to such static elements do these elements become focusable in the browser, allowing focus to move to them. This is why tabindex="-1" is still needed in these cases.
For static web pages that don't rely on comprehensive client side scripting, typically this is enough, but when inadvertent page refreshes occur when the page url changes, some ATs have trouble dealing with this and the focus movement at the same time, in which case the JavaScript method is still the most reliable across all browsers and platforms.
Bryan Garaventa
Accessibility Fellow
SSB BART Group, Inc.
<EMAIL REMOVED>
415.624.2709 (o)
www.SSBBartGroup.com
- Next message: Brooks Newton: "WebAIM-Forum Digest, Vol 138, Issue 11"
- Previous message: Tim Harshbarger: "Re: In-page links and programmatic focus"
- Next message in Thread: None
- Previous message in Thread: Tim Harshbarger: "Re: In-page links and programmatic focus"
- View all messages in this Thread