asciinema / asciinema-server

Platform for hosting and sharing terminal session recordings
https://asciinema.org
Apache License 2.0
2.26k stars 262 forks source link

Accessibility: embedded iframe lacks title #446

Closed kcgthb closed 1 month ago

kcgthb commented 1 month ago

Hi!

Accessibility checkers report that the iframe that's injected by the inline player script doesn't have a text alternative.

Description Every inline frame (iframe) should have a text alternative that summarizes its content or purpose. A title that summarizes the visual content will help screen reader users to understand the iframe's purpose on the page.

For instance, a generated iframe looks like:

<iframe src="[...]" id="[...]" name="[...]" scrolling="no" allowfullscreen="true" style="overflow: hidden; margin: 0px; border: 0px; display: inline-block; width: 100%; float: none; visibility: visible; height: 537px;"></iframe>

Would it be possible to add a title attribute to the injected iframe?

Thanks!

ku1ik commented 1 month ago

Would it be possible to add a title attribute to the injected iframe?

Definitely. As for what we should put in the title is not clear to me though. "A title that summarizes the visual content" - this implies we would describe the terminal preview, i.e. what user sees. But we can't easily describe it, so I suppose we have 2 options:

  1. generic, fixed text, e.g. "Terminal session recording"
  2. similar, but with the title of the recording (if set), e.g. "Terminal session recording titled ...."

What do you suggest? Both would satisfy the accessibility checkers, and I believe even 1. would be good enough for humans.

kcgthb commented 1 month ago

I think that 1. should be good enough for compliance indeed.

ku1ik commented 1 month ago

The fix will go out with the next asciinema server release.