Title: Accessibility
Last modified: October 13, 2023

---

# Accessibility

 *  Resolved [Patrick Boehner](https://wordpress.org/support/users/patrick-b/)
 * (@patrick-b)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/accessibility-74/)
 * Hi,
 * Love the plugin and appreciate that you have only extended the core block. A 
   couple of thoughts. Right now, the video is not accessible. There’s no way to
   navigate or interact with it since it’s just an image and a div. One simple change
   would be to change the div to a button ( I know this will require a bit of extra
   CSS), that way, someone using a screen reader and keyboard can trigger the video.
   It would also be good to provide a label for the button, either via an aria-label
   or a span with screen-reader-text class.
   **Current Button**
 *     ```wp-block-code
       <div class="play-button"></div>
       ```
   
 * **Updated Button**
 *     ```wp-block-code
       <button class="play-button" aria-label="Play Video"></button>
   
       <button class="play-button"><span class="screen-reader-text">Play Video</span></button>
       ```
   
 * In an ideal world it would be great to extend the block to add a custom field
   to the settings for a video title ( avoid the need for api calls ) and then that
   could be appended to the “Play Video: …. ” text.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Contributor [Mark Wilkinson](https://wordpress.org/support/users/wpmarkuk/)
 * (@wpmarkuk)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/accessibility-74/#post-17121180)
 * Hi Patrick,
 * Thanks for the suggestion and it certainly sounds like a sensible approach to
   me.
 * This is something that you could achieve yourself with just a little code. The
   play button, like the rest of the markup is added using a callback function on
   the `hd_bcve_video_thumbnail_markup` hook.
 * This means that you could easily unhook the plugins callback that adds the play
   button.
 * `remove_action( 'hd_bcve_video_thumbnail_markup', 'hd_bcve_add_video_play_button',
   20, 4 );`
 * Then you could hook something in which adds your button. For example:
 *     ```wp-block-code
       /**
        * Adds the play button div to the markup.
        *
        * @param array  $block           The block array.
        * @param string $video_id        The ID of the embedded video.
        * @param string $thumbnail_url   The URL of the video thumbnail.
        * @param array  $wrapper_classes An array of CSS classes to add to the wrapper.
        */
       function prefix_add_video_play_button( $block, $video_id, $thumbnail_url, $wrapper_classes ) {
   
       	?>
       	<button class="play-button" aria-label="Play Video"></button>
       	<?php
   
       }
   
       add_action( 'hd_bcve_video_thumbnail_markup', 'prefix_add_video_play_button', 20, 4 );
       ```
   
 * This would achieve the result you are after and then you could add the following
   lines of CSS, maybe in the customizer to style it.
 *     ```wp-block-code
       .hd-bcve-wrapper .play-button {
           background-color: transparent;
           border: none;
       }
       ```
   
 * I may well add something like this in the future, but for now the above should
   achieve the results you are looking for.
 *  Thread Starter [Patrick Boehner](https://wordpress.org/support/users/patrick-b/)
 * (@patrick-b)
 * [2 years, 6 months ago](https://wordpress.org/support/topic/accessibility-74/#post-17124117)
 * Hi Mark,
 * I had looked at the code but completely missed that. Thank you for making the
   plugin extendable. I’ll try that out.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Accessibility’ is closed to new replies.

 * ![](https://ps.w.org/better-core-video-embeds/assets/icon-256x256.jpg?rev=2824570)
 * [Better Core Video Embeds](https://wordpress.org/plugins/better-core-video-embeds/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/better-core-video-embeds/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/better-core-video-embeds/)
 * [Active Topics](https://wordpress.org/support/plugin/better-core-video-embeds/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/better-core-video-embeds/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/better-core-video-embeds/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Patrick Boehner](https://wordpress.org/support/users/patrick-b/)
 * Last activity: [2 years, 6 months ago](https://wordpress.org/support/topic/accessibility-74/#post-17124117)
 * Status: resolved