Forum Discussion
iFrame video becoming a keyboard trap
The keyboard trap issue with YouTube iFrames in Rise has been causing me a headache when building accessibility into my Rise Canvas course which I recently shared in the ELH ‘share examples’ section. I have a solution in final testing that I hope to implement into it soon…
Rise Canvas handles it in two ways:
1. A skip link appears before the video when keyboard users Tab to it, letting them bypass the player entirely if they choose.
2. For the related videos / “More videos” panel issue specifically — Rise Canvas uses the YouTube iFrame Player API to detect when the video ends (state 0). The moment playback finishes and YouTube would normally surface that panel, focus is automatically redirected out of the player and back into the Rise course. My script calls .focus() on it directly, pulling focus out before the related videos panel can grab it. Keyboard users never have to tab through those hidden items. This hopfully means the Rise Canvas exported code you drop into Rise’s code block is fully keyboard accessible…