Making WordPress.org

Changeset 10634


Ignore:
Timestamp:
01/30/2021 02:19:04 AM (4 years ago)
Author:
coreymckrill
Message:

WordPress.org Learn: Sync with GitHub

https://github.com/WordPress/learn/compare/1698199164e92bbff5c7e83dcbacf6ef2bef5abd...038726f5ec37e98926c536fac1837e1474015d8b

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-learn-2020/js/filters.js

    r10272 r10634  
    66( function ( $ ) {
    77    $( document ).ready( function() {
    8         $( '.filter-group-select' ).select2( {
     8        var $filters = $( '.filter-group-select' ).select2( {
    99            allowClear: true,
     10        } );
     11
     12        // Try to force screen readers to use select element and hide select2.
     13        $filters.each( function() {
     14            if ( $( this ).hasClass( 'select2-hidden-accessible' ) ) {
     15                $( this ).siblings( '.select2-container' ).find( '.selection' ).attr( { 'aria-hidden': 'true', 'tabindex': '-1' } );
     16                $( this ).removeAttr( 'aria-hidden' ).attr( 'tabindex', '0' );
     17            }
    1018        } );
    1119    } );
Note: See TracChangeset for help on using the changeset viewer.