WordPress.org

Make WordPress Core

Ticket #47149: 47149.7.diff

File 47149.7.diff, 1.1 KB (added by afercia, 6 weeks ago)
  • src/js/media/views/media-frame.js

     
    103103
    104104                tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
    105105
    106                 if ( this.menuView && this.menuView.isVisible ) {
     106                if ( this.state().get( 'menu' ) && this.menuView && this.menuView.isVisible ) {
    107107                        ariaLabelledby = 'menu-item-' + stateId;
    108108
    109109                        // Set the tab panel attributes only if the tabs are visible.
     
    129129
    130130                tabPanelEl.removeAttr( 'role aria-labelledby tabindex' );
    131131
    132                 // On the Embed view the router menu is hidden.
    133                 if ( 'embed' === this.content._mode ) {
    134                         return;
    135                 }
    136 
    137132                // Set the tab panel attributes only if the tabs are visible.
    138                 if ( this.routerView && this.routerView.isVisible && this.content._mode ) {
     133                if ( this.state().get( 'router' ) && this.routerView && this.routerView.isVisible && this.content._mode ) {
    139134                        ariaLabelledby = 'menu-item-' + this.content._mode;
    140135
    141136                        tabPanelEl