I am using InfoTemplate class in my application to show popup on the map. Let's say popup is open on the map. Now, if I try to navigate using tab key then cursor stops at Zoom To link.
If I want to avoid tabbing on this popup then how can I do that? e.g if you open following example in the browser and navigate using tab key then it will show cursor on Zoom To link when the control comes there. May be I need to set tabIndex="-1" on that link, but not sure how can I do that.
According to the W3C you can set a tabIndex for the following:
Modulo platform conventions, it is suggested that for the following elements, the tabindex focus flag be set:
a
elements that have an href
attributelink
elements that have an href
attributebutton
elementsinput
elements whose type
attribute are not in the Hidden stateselect
elementstextarea
elementsIf this is your only link on the page, you could use the a element and write:
document.getElementByTagName("a").tabIndex = -1;
to skip it.
If that does not work, you could try getting element by class name which in this case is actionList, so it would be:
document.getElementsByClassName("actionList").tabIndex = -1;
There may be a different way to write this if you are using AMD, but I am not sure.
Worst case scenario, you could host the JavaScript API locally and name then manually add tabIndex = -1.