Problem/Motivation

For accessibility purposes, the iframe that is rendered by this module in media-libsyn-embed.html.twig should have a "title" attribute that describes what the iframe contains. See: this section of the MDN documentation on iframes or the WCAG guidelines.

Steps to reproduce

The general steps to setup and configure the module and output a Libsyn podcast entity embed for this module. View the source of the output for the Libsyn embed: no title attribute is included. Compare this iframe to the iframes on the actual Libsyn website: they include the podcast episode's name in the "title" attribute.

Proposed resolution

Perhaps provide a way to include the podcast entity's title into the embed as a Twig variable for inclusion in media-libsyn-embed.html.twig? Or, recommend a way to include it via the template_preprocess_media_libsyn_embed function. I'm not really sure what method would be best.

CommentFileSizeAuthor
#3 iframe-title-3252322-3.patch3.24 KBahebrank

Comments

dalemoore created an issue. See original summary.

ahebrank’s picture

Category: Support request » Feature request

Changing to a feature request. It looks like the source scraper will need to be modified to get the title of the libsyn embed, which isn't currently stored. Once that title is there it should be pretty simple to modify the preprocessing / template.

ahebrank’s picture

Status: Active » Needs review
StatusFileSize
new3.24 KB

@dalemoore try this out.

dalemoore’s picture

@ahebrank Seems to work! Excellent, thanks. This should help those who run automated accessibility testing to have one less issue to get flagged. Thanks for this great module.

  • ahebrank committed dfedbae on 8.x-2.x
    Issue #3252322 by ahebrank: Provide title attribute for Libsyn Media...
ahebrank’s picture

Status: Needs review » Fixed
ahebrank’s picture

Merged and tagged as 2.2

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.