Make WordPress Core

Changeset 41024 for branches/4.8


Ignore:
Timestamp:
07/10/2017 11:15:28 PM (9 years ago)
Author:
SergeyBiryukov
Message:

Accessibility: Avoid a keyboard trap on the permalink custom structure setting.

Using the focus event on the permalink custom structure field made impossible
to navigate through all the form fields using only the keyboard without actually
selecting the custom structure setting. Instead, using click and input preserves
the original functionality when using any kind of pointing or input device.

Also changes attr() to prop() as recommended for a checked property.

Props afercia.
Fixes #40982.

Merges [40897] to the 4.8 branch.

Location:
branches/4.8
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.8

  • branches/4.8/src/wp-admin/includes/options.php

    r40579 r41024  
    101101                jQuery('#permalink_structure').val( this.value );
    102102        });
    103         jQuery('#permalink_structure').focus(function() {
    104                 jQuery("#custom_selection").attr('checked', 'checked');
     103        jQuery( '#permalink_structure' ).on( 'click input', function() {
     104                jQuery( '#custom_selection' ).prop( 'checked', true );
    105105        });
    106106});
Note: See TracChangeset for help on using the changeset viewer.