Problem/Motivation

The oEmbedFormatter renders remote video content in an iframe element. This element should contain a title attribute for better accessibility.

https://webaim.org/techniques/frames/#title

Proposed resolution

Add the name of the media as the title of the oEmbed iframe

Remaining tasks

  • ✅ File an issue about this project
  • ✅ Addition/Change/Update/Fix to this project
  • ✅ Testing to ensure no regression
  • ➖ Automated unit/functional testing coverage
  • ➖ Developer Documentation support on feature change/addition
  • ➖ User Guide Documentation support on feature change/addition
  • ✅ Accessibility and Readability
  • ✅ Code review from 1 Varbase core team member
  • ✅ Full testing and approval
  • ✅ Credit contributors
  • ✅ Review with the product owner
  • ✅ Update Release Notes and Update Helper on new feature change/addition
  • ✅ Release varbase-9.0.6, varbase_media-9.0.9

Varbase update type:

  • ✅ No Update
  • ➖ Optional Update
  • ➖ Forced Update
  • ➖ Forced Update if Unchanged

User interface changes

  • N/A

API changes

  • N/A

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hanii.gerges created an issue. See original summary.

hanii.gerges’s picture

Version: 9.1.x-dev » 9.0.x-dev
rajab natshah’s picture

Issue summary: View changes
Issue tags: +Accessibility
hanii.gerges’s picture

Status: Active » Needs review
rajab natshah’s picture

Status: Needs review » Needs work

Thanks, Hani for filing the issue, and the MR :)

Reviewed with Razem.

He liked the fix

Only I had a 2nd code review.
Needs a basic check not to have <iframe title=""> or <iframe title=" ">
In case the oEmbed media type had no name in any case. Or was not filled by the form mode selection.

rajab natshah’s picture

Issue summary: View changes
rajab natshah’s picture

Issue tags: +varbase-9.0.6
rajab natshah’s picture

Assigned: Unassigned » rajab natshah
Status: Needs work » Needs review
Issue tags: +a11y, +Needs accessibility review, +varbase_media-9.0.9
hanii.gerges’s picture

hanii.gerges’s picture

i think instead of isset() we can use !empty()
because empty() will check if the value exists and not empty by default
and the if statement will be like this

if (!empty($media->name->value)) {
  $element[$delta]['#attributes']['title'] = $media->name->value;
}

Made a MR for this.

rajab natshah’s picture

Agrees with that Hani.
Better to change it. Better coding style too.

rajab natshah’s picture

Issue summary: View changes
Issue tags: -Needs accessibility review
rajab natshah’s picture

Status: Needs review » Fixed
rajab natshah’s picture

Issue summary: View changes

✅ Released varbase_media-9.0.9

rajab natshah’s picture

✅ Released varbase-9.0.6

rajab natshah’s picture

Issue summary: View changes

Status: Fixed » Closed (fixed)

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