Editor: A11y: Set ARIA attributes for Classic Editor link inserter.
Set `aria-modal` and `aria-hidden` attributes when the Classic Editor link inserter modal is active, so that content behind the modal will be properly treated as inert when interacting with the modal. Props lyonmuller, jwgoedert, sabernhardt, alexstine, afercia, rajinsharwar, rcreators, audrasjb, hmbashar, joedolson. Fixes #60799. Built from https://develop.svn.wordpress.org/trunk@58450 git-svn-id: http://core.svn.wordpress.org/trunk@57899 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
026c9a8585
commit
95971e18b1
|
@ -1875,7 +1875,7 @@ 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" role="dialog" aria-labelledby="link-modal-title">
|
||||
<div id="wp-link-wrap" class="wp-core-ui" style="display: none" role="dialog" aria-modal="true" aria-labelledby="link-modal-title">
|
||||
<form id="wp-link" tabindex="-1">
|
||||
<?php wp_nonce_field( 'internal-linking', '_ajax_linking_nonce', false ); ?>
|
||||
<h1 id="link-modal-title"><?php _e( 'Insert/edit link' ); ?></h1>
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
var ed,
|
||||
$body = $( document.body );
|
||||
|
||||
$( '#wpwrap' ).attr( 'aria-hidden', 'true' );
|
||||
$body.addClass( 'modal-open' );
|
||||
wpLink.modalOpen = true;
|
||||
|
||||
|
@ -281,6 +282,7 @@
|
|||
|
||||
close: function( reset ) {
|
||||
$( document.body ).removeClass( 'modal-open' );
|
||||
$( '#wpwrap' ).removeAttr( 'aria-hidden' );
|
||||
wpLink.modalOpen = false;
|
||||
|
||||
if ( reset !== 'noReset' ) {
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -16,7 +16,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '6.6-beta3-58449';
|
||||
$wp_version = '6.6-beta3-58450';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue