Make WordPress Core

Changeset 61597


Ignore:
Timestamp:
02/07/2026 11:52:30 PM (8 weeks ago)
Author:
joedolson
Message:

Media: Add external icon to alt text links.

This link opens in a new tab, and needs a visual indicator to provide an affordance to sighted users that this will happen.

Props burtrw, sabernhardt, audrasjb, westonruter, joedolson.
Fixes #64374.

Location:
trunk/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/css/common.css

    r61480 r61597  
    140140    margin-top: -1px;
    141141    margin-left: 2px;
     142    text-decoration: none;
    142143}
    143144
  • trunk/src/wp-admin/includes/media.php

    r61594 r61597  
    32463246            'target="_blank"',
    32473247            sprintf(
    3248                 '<span class="screen-reader-text"> %s</span>',
     3248                '<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span>',
    32493249                /* translators: Hidden accessibility text. */
    32503250                __( '(opens in a new tab)' )
  • trunk/src/wp-includes/css/media-views.css

    r61480 r61597  
    504504}
    505505
     506.attachment-details .setting + .description .dashicons {
     507    width: 16px;
     508    height: 16px;
     509    font-size: 16px;
     510    margin-top: 0px;
     511}
     512
    506513.media-sidebar .setting .value,
    507514.attachment-details .setting .value,
  • trunk/src/wp-includes/media-template.php

    r60806 r61597  
    164164        'target="_blank"',
    165165        sprintf(
    166             '<span class="screen-reader-text"> %s</span>',
     166            '<span class="screen-reader-text"> %s</span><span aria-hidden="true" class="dashicons dashicons-external"></span>',
    167167            /* translators: Hidden accessibility text. */
    168168            __( '(opens in a new tab)' )
Note: See TracChangeset for help on using the changeset viewer.