Make WordPress Core

Ticket #55664: 55664.diff

File 55664.diff, 3.5 KB (added by afercia, 2 years ago)
  • src/wp-includes/embed.php

     
    11511151        if ( is_404() ) {
    11521152                return;
    11531153        }
     1154
     1155        $share_tab_wordpress_id   = uniqid( 'wp-embed-share-tab-wordpress-' );
     1156        $share_tab_html_id        = uniqid( 'wp-embed-share-tab-html-' );
     1157        $description_wordpress_id = uniqid( 'wp-embed-share-description-wordpress-' );
     1158        $description_html_id      = uniqid( 'wp-embed-share-description-html-' );
    11541159        ?>
    11551160        <div class="wp-embed-share-dialog hidden" role="dialog" aria-label="<?php esc_attr_e( 'Sharing options' ); ?>">
    11561161                <div class="wp-embed-share-dialog-content">
     
    11571162                        <div class="wp-embed-share-dialog-text">
    11581163                                <ul class="wp-embed-share-tabs" role="tablist">
    11591164                                        <li class="wp-embed-share-tab-button wp-embed-share-tab-button-wordpress" role="presentation">
    1160                                                 <button type="button" role="tab" aria-controls="wp-embed-share-tab-wordpress" aria-selected="true" tabindex="0"><?php esc_html_e( 'WordPress Embed' ); ?></button>
     1165                                                <button type="button" role="tab" aria-controls="<?php echo $share_tab_wordpress_id; ?>" aria-selected="true" tabindex="0"><?php esc_html_e( 'WordPress Embed' ); ?></button>
    11611166                                        </li>
    11621167                                        <li class="wp-embed-share-tab-button wp-embed-share-tab-button-html" role="presentation">
    1163                                                 <button type="button" role="tab" aria-controls="wp-embed-share-tab-html" aria-selected="false" tabindex="-1"><?php esc_html_e( 'HTML Embed' ); ?></button>
     1168                                                <button type="button" role="tab" aria-controls="<?php echo $share_tab_html_id; ?>" aria-selected="false" tabindex="-1"><?php esc_html_e( 'HTML Embed' ); ?></button>
    11641169                                        </li>
    11651170                                </ul>
    1166                                 <div id="wp-embed-share-tab-wordpress" class="wp-embed-share-tab" role="tabpanel" aria-hidden="false">
    1167                                         <input type="text" value="<?php the_permalink(); ?>" class="wp-embed-share-input" aria-describedby="wp-embed-share-description-wordpress" tabindex="0" readonly/>
     1171                                <div id="<?php echo $share_tab_wordpress_id; ?>" class="wp-embed-share-tab" role="tabpanel" aria-hidden="false">
     1172                                        <input type="text" value="<?php the_permalink(); ?>" class="wp-embed-share-input" aria-label="<?php esc_attr_e( 'URL' ); ?>" aria-describedby="<?php echo $description_wordpress_id; ?>" tabindex="0" readonly/>
    11681173
    1169                                         <p class="wp-embed-share-description" id="wp-embed-share-description-wordpress">
     1174                                        <p class="wp-embed-share-description" id="<?php echo $description_wordpress_id; ?>">
    11701175                                                <?php _e( 'Copy and paste this URL into your WordPress site to embed' ); ?>
    11711176                                        </p>
    11721177                                </div>
    1173                                 <div id="wp-embed-share-tab-html" class="wp-embed-share-tab" role="tabpanel" aria-hidden="true">
    1174                                         <textarea class="wp-embed-share-input" aria-describedby="wp-embed-share-description-html" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea>
     1178                                <div id="<?php echo $share_tab_html_id; ?>" class="wp-embed-share-tab" role="tabpanel" aria-hidden="true">
     1179                                        <textarea class="wp-embed-share-input" aria-label="<?php esc_attr_e( 'HTML' ); ?>" aria-describedby="<?php echo $description_html_id; ?>" tabindex="0" readonly><?php echo esc_textarea( get_post_embed_html( 600, 400 ) ); ?></textarea>
    11751180
    1176                                         <p class="wp-embed-share-description" id="wp-embed-share-description-html">
     1181                                        <p class="wp-embed-share-description" id="<?php echo $description_html_id; ?>">
    11771182                                                <?php _e( 'Copy and paste this code into your site to embed' ); ?>
    11781183                                        </p>
    11791184                                </div>