The following tables show the differences between what browsers consider focusable and what ally.js identifies using ally.is.focusable, ally.is.tabbable, ally.is.onlyTabbable and ally.get.focusRedirectTarget.
Note that touch devices (without a physical keyboard) only show elements as tabbable (keyboard focusable), that can be navigated to through the on-screen keyboard (or "virtual keyboard").
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<html>
|
inert
-1
|
inert
-1
|
inert
0
|
inert
0
|
inert
0
|
inert
0
|
focusable inert | focusable inert |
tabbable
inert
0
|
tabbable
inert
0
|
tabbable
inert
0
|
inert
-1
|
inert
-1
|
inert
-1
|
inert
-1
|
inert
-1
|
inert
-1
|
inert
-1
|
<body>
|
focusable inert | focusable inert | focusable inert | focusable inert | focusable inert | focusable inert | focusable inert | focusable inert |
tabbable
inert
0
E
|
tabbable
inert
0
|
tabbable
inert
0
E
|
focusable inert | focusable inert | focusable inert | focusable inert | focusable inert | focusable inert | focusable inert |
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<label for="…"> with <input id="…">
|
redirecting
-1
T
|
redirecting
-1
T
|
inert
redirecting
0
|
inert
redirecting
0
|
inert
redirecting
0
|
inert
redirecting
0
|
redirecting
-1
T
|
redirecting
-1
T
|
inert
redirecting
0
7
|
inert
redirecting
0
7
|
inert
redirecting
0
7
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
<label> with nested <input>
|
redirecting
-1
T
|
redirecting
-1
T
|
inert
redirecting
0
|
inert
redirecting
0
|
inert
redirecting
0
|
inert
redirecting
0
|
redirecting
-1
T
|
redirecting
-1
T
|
inert
redirecting
0
7
|
inert
redirecting
0
7
|
inert
redirecting
0
7
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
redirecting
-1
T
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<input> between <img usemap="#map"> and <img usemap="#map">
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
focusable
tabbable
0
50
|
focusable
tabbable
0
50
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
focusable
0
|
tabbable
0
|
<area> child of <map name="#…"> with <object type="image/png" usemap="#…">
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
focusable
inert
0
R
|
focusable
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
<area href="…"> with <object type="image/png" usemap="#…" >
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
focusable
inert
0
R
|
focusable
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
inert
0
R
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<audio controls tabindex="-1">
|
tabbable
-1
|
tabbable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
tabbable
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
tabbable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
focusable
-1
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<iframe src="…"> without focusable content
|
tabbable
focusable
0
S
|
tabbable
focusable
0
S
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
tabbable focusable | tabbable focusable |
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
tabbable
focusable
0
S
|
tabbable
focusable
0
S
|
tabbable
focusable
0
S
|
tabbable
focusable
0
S
|
tabbable
focusable
0
S
|
focusable
0
S
|
focusable
0
S
|
<iframe src="…"> with SVG document
|
focusable | focusable |
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
tabbable focusable | focusable |
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable | focusable | focusable | focusable | focusable | focusable | focusable |
<html> and <body> in <iframe>
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<embed>
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<object type="application/x-shockwave-flash" data="…">
|
focusable
0
|
focusable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
focusable
-1
|
focusable
-1
|
inert
0
|
focusable
tabbable
0
33
|
tabbable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
<object type="application/x-shockwave-flash" data="…" tabindex="0">
|
focusable
0
|
focusable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
tabbable
0
|
inert
0
|
focusable
tabbable
0
33
|
tabbable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
focusable
0
|
<object type="image/svg+xml" data="…">
|
focusable
0
C
|
focusable
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
tabbable | focusable tabbable |
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
<object type="image/svg+xml" data="…" tabindex="0">
|
focusable
0
C
|
focusable
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
tabbable | focusable tabbable |
inert host
inert
0
C
|
inert host
inert
0
C
|
inert host
inert
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
focusable
0
C
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<rect onfocus="">
|
tabbable
inert
0
40
|
tabbable
inert
0
40
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
-1
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
tabbable
inert
0
40
|
tabbable
inert
0
40
|
tabbable
inert
0
40
|
tabbable
inert
0
|
tabbable
inert
0
40
|
focusable
inert
0
40
|
focusable
inert
0
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<use> referencing focusable content
|
only tabbable inert | only tabbable inert | inert |
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
-1
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
only tabbable
inert
-1
S
|
inert
-1
38
|
only tabbable
inert
-1
S
|
only tabbable
inert
-1
S
|
only tabbable
inert
-1
S
|
inert
-1
|
inert
-1
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<svg> within <iframe>
|
inert
-1
R
|
inert
-1
R
|
tabbable | tabbable | only tabbable inert | only tabbable inert | inert | tabbable | tabbable | tabbable | tabbable |
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
content in <embed>
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<svg> within <object style="display: none">
|
inert | inert | inert | inert | inert | inert | inert | focusable inert | inert | inert | inert | inert | inert | inert | inert | inert | inert | inert |
<svg> within <object style="visibility: hidden">
|
inert
-1
R
|
inert
-1
R
|
inert | inert | inert | inert | inert | focusable inert | inert | inert | inert |
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
inert
-1
R
|
<svg> within <object> within <details>
|
inert | inert | tabbable | tabbable | inert | inert | inert | focusable inert | tabbable | tabbable | tabbable | inert | inert | inert | inert | inert | inert | inert |
Element | Chrome | Microsoft Edge | Firefox | IE | Opera | Safari | WebKit Nightly | Chrome Mobile (Android) | Safari (iOS) | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
55.0 | 57.0 | 12.10240 | 13.10586 | 14.14393 | 15.14951 | 50.0 | 53.0 | 9.0 | 10.0 | 11.0 | 42.0 | 8.0 | 9.1 | 10.0 | 604.1 | 55.0 | 10.0 | |
<keygen …>
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert | inert |
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
inert
null
M
|
focus
event is not emitted upon the element becoming the active element (document.activeElement
).:focus
CSS pseudo class is not set on the element when it is the active element (document.activeElement
).document.activeElement
) when an element of contentDocument
or the shadowRoot
has focus.Considering the <html>
and <body>
element focusable should have no benefit to a website (unless explicitly made focusable by adding the tabindex
attribute), which is why ally.js considers the <html>
and <body>
element inert.
The <html>
element itself is not considered focusable, but some browsers may give it focus when focus is passed from browser UI to the document.
The <body>
element itself is not considered focusable, but it is has focus (i.e. is document.activeElement
) if no other element has focus.
The activation behavior of the <label>
element is not defined beyond »… should match the platform's label behavior.«
Internet Explorer redirects focus from <label>
to the referenced form control element upon mouse click, but not on script focus via element.focus()
.
Technically the content of an iframe can be accessible to script.
Because of the Same Origin Policy we can't reliably look inside <iframe>
s to determine their content, which is why ally.js considers all <iframe>
content inert
There is no API to interact with the content document of an <embed>
element
Because there is no API to dive into the content document of an <embed>
element, ally.js considers all <embed>
content inert.
The behavior of the <object>
element depends on the content it presents. The most common content types used with <object>
are SVG
and SWF
.
This element is actually tabbable (keyboard focusable).
But when tabbing to it, the <kbd>Tab</kbd> behavior for the entire document breaks, as focus remains stuck on the browser UI.
This might be related to Trident 1109008.
SVG 1.1 does not specify much in respect to accessibility. SVG 2 will bring the tabindex
attribute. SVG Tiny 1.2 knows the focusable
attribute.
The <use>
element is keyboard focusable if it references content that contains focusable elements. Blink 665121
This element is actually tabbable (keyboard focusable).
However, as soon as a <use>
element became the active element, the <kbd>Tab</kbd> effectively becomes useless, because the tabbing order cannot be navigated anymore. See this demo.
<use>
elements referencing focusable content cannot be identified by ally.js
By registering a focus
event listener the element becomes focusable. Blink 445798, WebKit 140024.
This is undetectable because elements don't provide a list of their registered event handlers.
SVG 2: Focus says:
In particular, user agents may support using keyboard focus to reveal ‘title’ element text as tooltips, and may allow focus to reach elements which have been assigned listeners for mouse, pointer, or focus events
Elements made focusable by way of adding a focus
event listener cannot be identified by ally.js
Firefox may hide elements from the document's tabbing sequence if they're enclosed by two images referencing the same image map - Gecko 1116126.
This test is not about an element's focusable state, but about potentially content that's potentially hidden from the tabbing sequence.
Firefox transforms <keygen>
to <select _moz-type="-mozilla-keygen">
while parsing HTML.
The <keygen>
element is poorly supported, practically never used and has seen intent to deprecate
Because the <keygen>
element is poorly supported, ally considers all <keygen>
elements focus-relevant but not focusable.
Focus is redirected to the labeled control.
Focus is redirected to the nested labeled control.
The <iframe>
's document manages its own focus. Any time the <iframe>
or its content has focus, the master document's activeElement
points to the <iframe>
.
Note that <iframe>
s are only accessible to script when they share the same origin.
The <object>
's document manages its own focus. Any time the <object>
or its content has focus, the master document's activeElement
points to the <object>
.
Note that <object>
s are only accessible to script via element.contentWindow
when they share the same origin.
This element could not be tested in this browser.
When this element is the activeElement, the reference element <iframe>
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element details object[src=svg]
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element details object[src=svg]
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element details object[src=svg]
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <iframe>
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <iframe>
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <object usemap="…">
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <object usemap="…">
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <object type="image/svg+xml">
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
eventWhen this element is the activeElement, the reference element <object type="image/svg+xml">
has the following state:
activeElement
in its context:focus
CSS pseudo class appliedfocus
event