Make WordPress Core

Ticket #50516: 50516.diff

File 50516.diff, 2.0 KB (added by audrasjb, 4 years ago)

Partially fixes the issue by adding aria-button-if-js class to action links

  • src/wp-admin/includes/class-wp-ms-themes-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-ms-themes-list-table.php b/src/wp-admin/includes/class-wp-ms-themes-list-table.php
    index 2a7dab15a7..84a67ba610 100644
    a b class WP_MS_Themes_List_Table extends WP_List_Table { 
    744744                $url = add_query_arg( $query_args, 'themes.php' );
    745745
    746746                $html[] = sprintf(
    747                         '<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
     747                        '<a href="%s" class="aria-button-if-js toggle-auto-update" data-wp-action="%s">',
    748748                        wp_nonce_url( $url, 'updates' ),
    749749                        $action
    750750                );
  • src/wp-admin/includes/class-wp-plugins-list-table.php

    diff --git a/src/wp-admin/includes/class-wp-plugins-list-table.php b/src/wp-admin/includes/class-wp-plugins-list-table.php
    index f257354db6..ffd77ebe9a 100644
    a b class WP_Plugins_List_Table extends WP_List_Table { 
    10651065                                        $url = add_query_arg( $query_args, 'plugins.php' );
    10661066
    10671067                                        $html[] = sprintf(
    1068                                                 '<a href="%s" class="toggle-auto-update" data-wp-action="%s">',
     1068                                                '<a href="%s" class="aria-button-if-js toggle-auto-update" data-wp-action="%s">',
    10691069                                                wp_nonce_url( $url, 'updates' ),
    10701070                                                $action
    10711071                                        );
  • src/wp-admin/themes.php

    diff --git a/src/wp-admin/themes.php b/src/wp-admin/themes.php
    index 086b4e3def..8d214c955c 100644
    a b function wp_theme_auto_update_setting_template() { 
    562562        $template = '
    563563                <div class="theme-autoupdate">
    564564                        <# if ( data.autoupdate ) { #>
    565                                 <a href="{{{ data.actions.autoupdate }}}" class="toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable">
     565                                <a href="{{{ data.actions.autoupdate }}}" class="aria-button-if-js toggle-auto-update" data-slug="{{ data.id }}" data-wp-action="disable">
    566566                                        <span class="dashicons dashicons-update spin hidden" aria-hidden="true"></span>
    567567                                        <span class="label">' . __( 'Disable auto-updates' ) . '</span>
    568568                                </a>