WordPress.org

Make WordPress Core

Changeset 45925


Ignore:
Timestamp:
09/01/2019 03:17:37 PM (3 months ago)
Author:
afercia
Message:

Accessibility: Add a default title for the media modal dialog.

Makes sure the media modal dialog h1 heading isn't empty when custom media frames don't set a title. This is particularly important now that the media modal is an ARIA dialog, as the title is referenced by an aria-labelledby attribute to properly label the dialog.

Props donmhico, audrasjb.
Fixes #47612.

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/js/media/views/media-frame.js

    r43309 r45925  
    11var Frame = wp.media.view.Frame,
     2    l10n = wp.media.view.l10n,
    23    $ = jQuery,
    34    MediaFrame;
     
    3334
    3435        _.defaults( this.options, {
    35             title:    '',
     36            title:    l10n.mediaFrameDefaultTitle,
    3637            modal:    true,
    3738            uploader: true
  • trunk/src/wp-includes/media.php

    r45825 r45925  
    37653765    $strings = array(
    37663766        // Generic
     3767        'mediaFrameDefaultTitle'      => __( 'Media' ),
    37673768        'url'                         => __( 'URL' ),
    37683769        'addMedia'                    => __( 'Add Media' ),
Note: See TracChangeset for help on using the changeset viewer.