Make WordPress Core


Ignore:
Timestamp:
03/01/2015 07:10:58 PM (10 years ago)
Author:
azaozz
Message:

Add wp.a11y.speak() for audible alerts/updates in screen readers. Props afercia, GrahamArmfield (for the idea), iseulde. Fixes #31368.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/script-loader.php

    r31588 r31594  
    8282        'warnDelete' => __("You are about to permanently delete the selected items.\n  'Cancel' to stop, 'OK' to delete.")
    8383    ) );
     84
     85    $scripts->add( 'wp-a11y', "/wp-includes/js/wp-a11y$suffix.js", array( 'jquery' ), false, 1 );
    8486
    8587    $scripts->add( 'sack', "/wp-includes/js/tw-sack$suffix.js", array(), '1.6.1', 1 );
     
    381383    $scripts->add( 'hoverIntent', "/wp-includes/js/hoverIntent$suffix.js", array('jquery'), 'r7', 1 );
    382384
    383     $scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore' ), false, 1 );
     385    $scripts->add( 'customize-base',     "/wp-includes/js/customize-base$suffix.js",     array( 'jquery', 'json2', 'underscore', 'wp-a11y' ), false, 1 );
    384386    $scripts->add( 'customize-loader',   "/wp-includes/js/customize-loader$suffix.js",   array( 'customize-base' ), false, 1 );
    385387    $scripts->add( 'customize-preview',  "/wp-includes/js/customize-preview$suffix.js",  array( 'customize-base' ), false, 1 );
     
    533535        ) );
    534536
    535         $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util' ) );
     537        $scripts->add( 'updates', "/wp-admin/js/updates$suffix.js", array( 'jquery', 'wp-util', 'wp-a11y' ) );
    536538        did_action( 'init' ) && $scripts->localize( 'updates', '_wpUpdatesSettings', array(
    537539            'ajax_nonce' => wp_create_nonce( 'updates' ),
     
    544546                'installed'     => __( 'Installed!' ),
    545547                'installFailed' => __( 'Installation failed' ),
     548                'updatingMsg'   => __( 'Updating... please wait.' ),
     549                'installingMsg' => __( 'Installing... please wait.' ),
     550                'updatedMsg'    => __( 'Update completed successfully.' ),
     551                'installedMsg'  => __( 'Installation completed successfully.' ),
    546552            )
    547553        ) );
Note: See TracChangeset for help on using the changeset viewer.