File Editor
Directories:
.. (Back)
crop
imgareaselect
jcrop
jquery
mediaelement
plupload
swfupload
thickbox
tinymce
Files:
admin-bar.js
admin-bar.min.js
autosave.js
autosave.min.js
backbone.min.js
colorpicker.js
colorpicker.min.js
comment-reply.js
comment-reply.min.js
customize-base.js
customize-base.min.js
customize-loader.js
customize-loader.min.js
customize-models.js
customize-models.min.js
customize-preview-nav-menus.js
customize-preview-nav-menus.min.js
customize-preview-widgets.js
customize-preview-widgets.min.js
customize-preview.js
customize-preview.min.js
customize-selective-refresh.js
customize-selective-refresh.min.js
customize-views.js
customize-views.min.js
heartbeat.js
heartbeat.min.js
hoverIntent.js
hoverIntent.min.js
imagesloaded.min.js
json2.js
json2.min.js
masonry.min.js
mce-view.js
mce-view.min.js
media-audiovideo.js
media-audiovideo.min.js
media-editor.js
media-editor.min.js
media-grid.js
media-grid.min.js
media-models.js
media-models.min.js
media-views.js
media-views.min.js
quicktags.js
quicktags.min.js
shortcode.js
shortcode.min.js
swfobject.js
tw-sack.js
tw-sack.min.js
twemoji.js
twemoji.min.js
underscore.min.js
utils.js
utils.min.js
wp-a11y.js
wp-a11y.min.js
wp-ajax-response.js
wp-ajax-response.min.js
wp-auth-check.js
wp-auth-check.min.js
wp-backbone.js
wp-backbone.min.js
wp-embed-template.js
wp-embed-template.min.js
wp-embed.js
wp-embed.min.js
wp-emoji-loader.js
wp-emoji-loader.min.js
wp-emoji-release.min.js
wp-emoji.js
wp-emoji.min.js
wp-list-revisions.js
wp-list-revisions.min.js
wp-lists.js
wp-lists.min.js
wp-pointer.js
wp-pointer.min.js
wp-util.js
wp-util.min.js
wpdialog.js
wpdialog.min.js
wplink.js
wplink.min.js
zxcvbn-async.js
zxcvbn-async.min.js
zxcvbn.min.js
Create New File
Create
Edit File: wp-a11y.js
window.wp = window.wp || {}; ( function ( wp, $ ) { 'use strict'; var $containerPolite, $containerAssertive; /** * Update the ARIA live notification area text node. * * @since 4.2.0 * @since 4.3.0 Introduced the 'ariaLive' argument. * * @param {String} message The message to be announced by Assistive Technologies. * @param {String} ariaLive Optional. The politeness level for aria-live. Possible values: * polite or assertive. Default polite. */ function speak( message, ariaLive ) { // Clear previous messages to allow repeated strings being read out. clear(); // Ensure only text is sent to screen readers. message = $( '<p>' ).html( message ).text(); if ( $containerAssertive && 'assertive' === ariaLive ) { $containerAssertive.text( message ); } else if ( $containerPolite ) { $containerPolite.text( message ); } } /** * Build the live regions markup. * * @since 4.3.0 * * @param {String} ariaLive Optional. Value for the 'aria-live' attribute, default 'polite'. * * @return {Object} $container The ARIA live region jQuery object. */ function addContainer( ariaLive ) { ariaLive = ariaLive || 'polite'; var $container = $( '<div>', { 'id': 'wp-a11y-speak-' + ariaLive, 'aria-live': ariaLive, 'aria-relevant': 'additions text', 'aria-atomic': 'true', 'class': 'screen-reader-text wp-a11y-speak-region' }); $( document.body ).append( $container ); return $container; } /** * Clear the live regions. * * @since 4.3.0 */ function clear() { $( '.wp-a11y-speak-region' ).text( '' ); } /** * Initialize wp.a11y and define ARIA live notification area. * * @since 4.2.0 * @since 4.3.0 Added the assertive live region. */ $( document ).ready( function() { $containerPolite = $( '#wp-a11y-speak-polite' ); $containerAssertive = $( '#wp-a11y-speak-assertive' ); if ( ! $containerPolite.length ) { $containerPolite = addContainer( 'polite' ); } if ( ! $containerAssertive.length ) { $containerAssertive = addContainer( 'assertive' ); } }); wp.a11y = wp.a11y || {}; wp.a11y.speak = speak; }( window.wp, window.jQuery ));
Save Changes
Rename File
Rename