mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 22:30:04 +00:00
wpLink: fix accessibility issues:
- Add role=dialog and an aria-labelledby attribute to the modal container. - Change the modal title to h1. - Remove one ` ` that gets read out as `blank` by screen readers. - Replace the Cancel link with a button. - Clean up unused CSS. Props afercia. Fixes #30468. git-svn-id: https://develop.svn.wordpress.org/trunk@36991 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1403,13 +1403,11 @@ final class _WP_Editors {
|
||||
// display: none is required here, see #WP27605
|
||||
?>
|
||||
<div id="wp-link-backdrop" style="display: none"></div>
|
||||
<div id="wp-link-wrap" class="wp-core-ui" style="display: none">
|
||||
<div id="wp-link-wrap" class="wp-core-ui" style="display: none" role="dialog" aria-labelledby="link-modal-title">
|
||||
<form id="wp-link" tabindex="-1">
|
||||
<?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?>
|
||||
<div id="link-modal-title">
|
||||
<?php _e( 'Insert/edit link' ) ?>
|
||||
<button type="button" id="wp-link-close"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
|
||||
</div>
|
||||
<h1 id="link-modal-title"><?php _e( 'Insert/edit link' ) ?></h1>
|
||||
<button type="button" id="wp-link-close"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
|
||||
<div id="link-selector">
|
||||
<div id="link-options">
|
||||
<div>
|
||||
@@ -1421,14 +1419,14 @@ final class _WP_Editors {
|
||||
<input id="wp-link-text" type="text" /></label>
|
||||
</div>
|
||||
<div class="link-target">
|
||||
<label><span> </span>
|
||||
<label><span></span>
|
||||
<input type="checkbox" id="wp-link-target" /> <?php _e( 'Open link in a new tab' ); ?></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="submitbox">
|
||||
<div id="wp-link-cancel">
|
||||
<a class="submitdelete deletion" href="#"><?php _e( 'Cancel' ); ?></a>
|
||||
<button type="button" class="button"><?php _e( 'Cancel' ); ?></button>
|
||||
</div>
|
||||
<div id="wp-link-update">
|
||||
<input type="submit" value="<?php esc_attr_e( 'Add Link' ); ?>" class="button button-primary" id="wp-link-submit" name="wp-link-submit">
|
||||
|
||||
Reference in New Issue
Block a user