-
AuthorPosts
-
January 16, 2026 at 1:32 am #1494001
My client hired a company to run an accessibility review and one of the items they flagged was our video elements not having descriptive text, but it seems like their suggestions for how to address the issue would require using manually embeded code, as opposed to Enfold’s video element — here’s what they suggest:
“Identify video content by setting a video tag in the iframe, then use aria-label or aria-decribedby to describe the media content. Alternatively, modify the aria-label in the id=”movie_player” element to properly describe the media content while still including that it is a YouTube video.”
Is there any way to add descriptive text while still using the video elements, or do you think using the manual embed code is the best way to address this, or do you have another idea? The videos they point to as examples are in columns 1 and 4 towards the bottom of the home page: https://abodecommunities.org/
Thanks and lmk if you have any questions!
January 16, 2026 at 4:59 am #1494003Hey sky19er,
Thank you for the inquiry.
We recommend using an embed code so you don’t need to modify the video templates in the theme.
You can use the Text or Code Block element to add the embed code.If you do want to proceed with the modification, you can find the video element template in the
config-templatebuilder/avia-shortcodes/video/video.php file.Let us know if you need more info.
Best regards,
IsmaelJanuary 16, 2026 at 2:39 pm #1494020but if it is a youtube video – why not implementing descriptive text on uploading it to yt?
I use vimeo – but i can insert on the vimeo backend a lot of info to the videos.Subject: How to add a descriptive text to your YouTube uploads
Yes, there is a dedicated way to do this! When you upload a video, you use the “Description” field. This is one of the most important steps for making your video discoverable.
Where to find it:
During Upload: In YouTube Studio, the Description box appears right below the Video Title.
After Uploading: You can edit it anytime by going to your Content tab in YouTube Studio, clicking the pencil icon (Details) on your video, and updating the text.
Why it matters:
SEO (Search Engine Optimization): YouTube’s algorithm uses this text to understand your content and show it in search results.
User Engagement: You can include links to your website, social media, or products.
Accessibility: It helps screen readers describe the video content to visually impaired users.
Best Practices for your description:
The Hook: The first two lines are the most important because they appear before the “Show More” button. Put your most vital info or call-to-action here.
Timestamps (Chapters): If you type timestamps like 02:15 – Chapter Name, YouTube will automatically create clickable segments in the video player.
Keywords: Use natural language to describe the video, including words people might type into the search bar.
Hashtags: Add 2–3 relevant hashtags at the bottom (e.g., #Tutorial #Vlog) to help with categorization.
Pro Tip: If you want to save time, go to Settings > Upload Defaults. You can save a template (like your social media links) that will automatically appear in the description box every time you upload a new video.
January 16, 2026 at 7:16 pm #1494023Thanks, Ismael, and thanks, Guenni — but Guenni, doesn’t that description only come available to the user if they click through to watch the video on YouTube or Vimeo? If they’re just watching the embedded video on your/our site, they don’t get that description, right?
January 16, 2026 at 9:30 pm #1494026sometimes the way via youtube api v3 does not work – even if you have connected your billing details with that api.
place a snippet to your child-theme funcions.php:
– Registering the shortcode for the descriptive text (without api use – and google costs ;)/** * Final Version: Fetches YouTube description and converts links correctly * preventing double-tagging or broken HTML. */ function get_yt_description_final($atts) { $a = shortcode_atts(array('id' => ''), $atts); if (empty($a['id'])) return 'Video ID missing.'; $v_id = esc_attr($a['id']); // Use a fresh cache key to overwrite the broken HTML in your database $transient_key = 'yt_desc_v3_clean_' . $v_id; $description = get_transient($transient_key); if (false === $description) { $response = wp_remote_get("https://www.youtube.com/watch?v=" . $v_id, array( 'user-agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36' )); if (is_wp_error($response)) return 'YouTube connection error.'; $html = wp_remote_retrieve_body($response); if (preg_match('/"shortDescription":"(.+?)"/', $html, $matches)) { $description = $matches[1]; // Decode unicode characters $description = json_decode('"' . $description . '"'); // Clean up backslashes before storing $description = stripslashes($description); set_transient($transient_key, $description, DAY_IN_SECONDS); } else { return 'Description currently unavailable.'; } } // 1. First: Escape the raw text to be safe from XSS $safe_desc = esc_html($description); // 2. Second: Convert URLs into clickable links using a more precise regex // This regex matches URLs starting with http or https $pattern = '~(?<!["\'>])\bhttps?://[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/))~'; $clickable_desc = preg_replace($pattern, '<a href="$0" target="_blank" rel="nofollow">$0</a>', $safe_desc); // 3. Output the result return '<div class="yt-desc-box" style="white-space: pre-wrap; word-break: break-word; background:#f9f9f9; padding:20px; border-radius:5px; border:1px solid #ddd; height:350px; overflow-y:auto;">' . $clickable_desc . '</div>'; } add_shortcode('video_description', 'get_yt_description_final');after that – place a shortcode under your embedded video:
[video_description id="youtube-ID"]see: https://webers-testseite.de/videos/
( there you can easily copy&paste the needed code – and see examples )because i do not believe that this is GDPR konform – i block it til you accept to see the youtube video.
January 17, 2026 at 7:45 am #1494028by the way: if you like to have the hight of the descriptive box ruled by enfolds text-block fold /unfold setting – just remove that height and overflow styling inside the snippet (// 3. Output the result)
and if you like to have that text only for SEO pupose – use that setting for invisibility from my page
if you like to have it only for SEO : use that setting globaly:#top .yt-desc-box { border: 0 !important; clip: rect(0 0 0 0); height: 1px !important; margin: -1px; overflow: hidden; padding: 0 !important; position: absolute; width: 1px; }January 21, 2026 at 1:51 am #1494116Thanks again, Guenni! I’m not sure this is the right solution for us — I’m going to talk with the accessibility consultants about our options — but I appreciate your thoroughness, as always, and will keep this in my back pocket!
-
AuthorPosts
- You must be logged in to reply to this topic.
