You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Turns out, Skip Links might not get announced if tabindex="-1" does not exist on the focus target (i.e. #main in this case).
On the other hand, if tabindex=-1is present, then the focus behaviour for tapping somewhere on the page can bring focus all the way to the top. (It really is not supposed to do that).
One potential solution is to only add tabindex right before the focus is moved, and remove it after. This relies on JS, but is largely a progressive enhancement. Without JS, the behaviour is still a bit "meh", because it seems to me that the tabindex bug can be more serious; or, another way, the announcement seems to be getting fixed.
Steps:
Try out the solution by adding a js/SkipLink.js module
Test on Android and iOS, both with and without (the PR app helps!)
Decide on the way forward, document it
Reach out to folks / write and share. I think it can help others!
Might want to look into various bug trackers from browsers.
The text was updated successfully, but these errors were encountered:
I went down a rabbit hole of browser bugs and mobile testing, after reading this https://axesslab.com/skip-links/.
Turns out, Skip Links might not get announced if
tabindex="-1"
does not exist on the focus target (i.e.#main
in this case).On the other hand, if
tabindex=-1
is present, then the focus behaviour for tapping somewhere on the page can bring focus all the way to the top. (It really is not supposed to do that).One potential solution is to only add
tabindex
right before the focus is moved, and remove it after. This relies on JS, but is largely a progressive enhancement. Without JS, the behaviour is still a bit "meh", because it seems to me that thetabindex
bug can be more serious; or, another way, the announcement seems to be getting fixed.Steps:
js/SkipLink.js
moduleMight want to look into various bug trackers from browsers.
The text was updated successfully, but these errors were encountered: