Open Bug 530455 Opened 12 years ago Updated 11 years ago

Can't set a tabindex to a video or audio element


(Toolkit :: Video/Audio Controls, defect)

Not set




(Reporter: yves.vangoethem, Unassigned)




(Keywords: access, html5, Whiteboard: video, audio, tabindex, keyboard)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv: Gecko/20091102 Firefox/3.5.5
Build Identifier: 

Setting a custom value for the tabindex attribute on video and audio elements isn't possible without JavaScript.

Reproducible: Always

Steps to Reproduce:
1. Go to the attached URL
2. Hit the TAB key to focus a video element
3. The last element will get focus, since the tabindex was set in JavaScript
4. Than the cursor goes back to the first present focusable element of the page.
Actual Results:  
The browser adds tabindex="0" to any video or audio element and overrides the value of the attribute if any else was present.

Setting a tabindex attribute is still possible in JavaScript.

Expected Results:  
The browser shouldn't override the defined value of a tabindex.

This looks like a quick-fix to make video keyboard accessible, because removing tabindex from video and audio elements with JavaScript makes them unreachable by the keyboard.
The HTML5 draft defines video and audio as "Interactive Content" and must therefore be keyboard accessible :
Keywords: access, html5
Whiteboard: video, audio, tabindex, keyboard
Version: unspecified → 1.9.1 Branch
Yeah, there's some discussion in bug 486899 and bug 494175 comment 23, just as well to have a specific bug on this.

We could wallpaper over this specific problem by only setting tabindex when there is no currently specified tabindex (we unconditionally set it to 0 right now), but fixing this the right way (per above bugs) would be best...
Ever confirmed: true
Component: Video/Audio → Video/Audio Controls
Product: Core → Toolkit
QA Contact: →
Version: 1.9.1 Branch → unspecified
You need to log in before you can comment on or make changes to this bug.