mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-16 15:46:04 +01:00
Accessibility: Media: Improve the logic to render the ARIA tabs markup after [46363].
Additionally checks for the "menu" and "router" state attributes to better determine when the ARIA tabs pattern markup is appropriate. See #47149. Built from https://develop.svn.wordpress.org/trunk@46438 git-svn-id: http://core.svn.wordpress.org/trunk@46236 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fefc2f56ed
commit
932df464e6
@ -3004,7 +3004,7 @@ MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
|
|||||||
|
|
||||||
tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
|
tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
|
||||||
|
|
||||||
if ( this.menuView && this.menuView.isVisible ) {
|
if ( this.state().get( 'menu' ) && this.menuView && this.menuView.isVisible ) {
|
||||||
ariaLabelledby = 'menu-item-' + stateId;
|
ariaLabelledby = 'menu-item-' + stateId;
|
||||||
|
|
||||||
// Set the tab panel attributes only if the tabs are visible.
|
// Set the tab panel attributes only if the tabs are visible.
|
||||||
@ -3030,13 +3030,8 @@ MediaFrame = Frame.extend(/** @lends wp.media.view.MediaFrame.prototype */{
|
|||||||
|
|
||||||
tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
|
tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
|
||||||
|
|
||||||
// On the Embed view the router menu is hidden.
|
|
||||||
if ( 'embed' === this.content._mode ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set the tab panel attributes only if the tabs are visible.
|
// Set the tab panel attributes only if the tabs are visible.
|
||||||
if ( this.routerView && this.routerView.isVisible && this.content._mode ) {
|
if ( this.state().get( 'router' ) && this.routerView && this.routerView.isVisible && this.content._mode ) {
|
||||||
ariaLabelledby = 'menu-item-' + this.content._mode;
|
ariaLabelledby = 'menu-item-' + this.content._mode;
|
||||||
|
|
||||||
tabPanelEl
|
tabPanelEl
|
||||||
|
2
wp-includes/js/media-views.min.js
vendored
2
wp-includes/js/media-views.min.js
vendored
File diff suppressed because one or more lines are too long
@ -13,7 +13,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '5.3-beta2-46437';
|
$wp_version = '5.3-beta2-46438';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
Reference in New Issue
Block a user