Support

Account

Home Forums General Issues How to add captions to videos for ADA compliance? Reply To: How to add captions to videos for ADA compliance?

  • This is what I would do if I needed to do this. (after doing a little research)

    I would use a URL field for the video and not an oembed field.
    I would add an additional file field to upload the captions

    In my PHP code I would do

    
    <?php 
      $shortcode = '[video src="'.get_field('video_url_field').'"]';
      $shortcode .= '<track srclang="en" label="English" kind="subtitles" src="'.get_field('captions-file-field').'" default>';
      $shortcode .= '[/video]';
      echo do_shortcode($shortcode);
    ?>
    

    See this https://stphnwlkr.co/web/adding-video-to-wordpress/

    It might be possible to use an oembed field if you get the value without formatting so that ACF does not do the formatting of the field.