WordPress.org

Making WordPress.org

Ticket #3048: 3048.diff

File 3048.diff, 2.5 KB (added by Kau-Boy, 3 years ago)
  • wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/js/chapters.js

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/js/chapters.js wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/js/chapters.js
    index 652cc24..6849863 100644
    jQuery(document).ready(function() { 
    44        // Add our expandable button
    55        jQuery( '.menu-table-of-contents-container > ul > .menu-item-has-children > a' )
    66                .wrap( '<div class="expandable"></div>' )
    7                 .before( '<span class="dashicons dashicons-arrow-down-alt2"></span>' );
     7                .after( '<button class="dashicons dashicons-arrow-down-alt2" aria-expanded="false"></button>' );
    88
    99        // Invisibly open all of the submenus
    1010        jQuery( '.menu-item-has-children > ul ul' ).addClass( 'default-open' );
    jQuery(document).ready(function() { 
    1818        // Or if wrapped in a div.expandable
    1919        jQuery( '.menu-item-has-children > div > .dashicons' ).click( function() {
    2020                jQuery( this ).parent().siblings( '.children' ).slideToggle();
    21                 jQuery( this ).closest( '.menu-item-has-children' ).toggleClass( 'open' );
     21                var $menu_toggle = jQuery( this ).closest( '.menu-item-has-children' );
     22                $menu_toggle.toggleClass( 'open' );
     23                $menu_toggle.attr( 'aria-expanded', 'false' === $menu_toggle.attr( 'aria-expanded' ) ? 'true' : 'false' );
    2224        } );
    2325} );
    2426
  • wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/style.css

    diff --git wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/style.css wordpress.org/public_html/wp-content/themes/pub/wporg-breathe/style.css
    index 1197e1c..ccc8955 100644
    h2.toc-heading + h3.toc-heading:target { 
    11071107  color: #0073aa;
    11081108  background-color: #fafafa;
    11091109  border-left: 1px solid rgba(0,0,0,0.05);
    1110 }
    1111 .menu-table-of-contents-container ul li .dashicons:hover {
     1110  border-top: 0;
     1111  border-bottom: 0;
     1112  border-radius: 0;
     1113  box-shadow: none;
     1114  -webkit-appearance: none;
     1115}
     1116.menu-table-of-contents-container ul li .dashicons:hover,
     1117.menu-table-of-contents-container ul li .dashicons:focus {
    11121118  color: #fff;
    11131119  background-color: #0073aa;
    11141120}
    h2.toc-heading + h3.toc-heading:target { 
    11271133  padding: 8px 40px 8px 8px;
    11281134  text-decoration: none;
    11291135}
    1130 .menu-table-of-contents-container ul a:hover {
     1136.menu-table-of-contents-container ul a:hover,
     1137.menu-table-of-contents-container ul a:focus {
    11311138  color: #fff;
    11321139  background-color: #0073aa;
    11331140}