adobe / helix-embed

Embed service for helix.
Apache License 2.0
5 stars 3 forks source link

Accessibility: iframe elements are missing a title attribute #286

Closed rofe closed 4 years ago

rofe commented 4 years ago

Description The embed's iframe element is missing a title attribute.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://blog.adobe.com/en/2020/07/09/prototypes-enhance-remote-design-dev-collaboration.html and inspect the DOM for the video embed
  2. Note the missing title attribute

Expected behavior Screen reader users rely on a frame title to describe the contents of the frame. Navigating through frame and iframe elements quickly becomes difficult and confusing for users of this technology if the markup does not contain a title attribute.

Screen reader users have the option to pull up a list of titles for all frames on a page. Adding descriptive, unique titles allows users to quickly find the frame they need. If no titles are present, navigating through frames can quickly become difficult and confusing. If no title is listed, screen readers will instead give information like “frame,” “JavaScript,” the filename, or the URL. In most cases, this information won’t be very helpful.

Proposed solution Rewrite the iframe element coming from iframely in helix-embed, adding the title attribute.

Additional context

MarquiseRosier commented 4 years ago

I can take this! helix-embed already runs the embed code we built; and it finds the title in the metadata already; so i'll just make sure to include this!

trieloff commented 4 years ago

If the provided iframe already has a title, we should take the provided one.

MarquiseRosier commented 4 years ago

@trieloff What do you think is the right thing to do if our embed can’t find a title? Inevitably, there will be circumstances where a title won’t be possible from unfurl, or iframely

trieloff commented 4 years ago

It's quite unlikely, and we would not add a title in that case.

rofe commented 4 years ago

@MarquiseRosier or maybe add the type of embed, like "YouTube embed". That will already help screen readers better than having no title.

adobe-bot commented 4 years ago

:tada: This issue has been resolved in version 1.5.21 :tada:

The release is available on:

Your semantic-release bot :package::rocket: