Make WordPress Core


Ignore:
Timestamp:
09/19/2025 08:52:52 PM (10 months ago)
Author:
joedolson
Message:

Editor: A11y: Set aria-haspopup on Add Media button.

Add the aria-haspopup attribute and aria-controls on the Add Media button in the classic editor, so that screen reader users are notified about the behavior of the button.

Props alh0319, rishabhwp, joedolson.
Fixes #63973.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/media.php

    r60681 r60786  
    656656
    657657        printf(
    658                 '<button type="button"%s class="button insert-media add_media" data-editor="%s">%s</button>',
     658                '<button type="button"%s class="button insert-media add_media" data-editor="%s" aria-haspopup="dialog" aria-controls="wp-media-modal">%s</button>',
    659659                $id_attribute,
    660660                esc_attr( $editor_id ),
Note: See TracChangeset for help on using the changeset viewer.