[wp-trac] [WordPress Trac] #33184: Customizer: unnecessary events bound on some section titles

WordPress Trac noreply at wordpress.org
Thu Jul 30 20:41:16 UTC 2015


#33184: Customizer: unnecessary events bound on some section titles
--------------------------+----------------------------------------
 Reporter:  afercia       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Future Release
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  accessibility, javascript
--------------------------+----------------------------------------

Comment (by afercia):

 First pass for some events sanity. Discussed a bit on Slack, looks like
 the `accordion-section-title` is currently used (both in `accordion.js`
 and `customize-controls.js) to attach events that are unnecessary on some
 divs and break keyboard interaction when pressing Enter on buttons inside
 these divs.

 - `.accordion-section-title` should be used just for accordions
 - divs that aren't accordions should use a different class just for
 styling, here I'm using `.was-accordion-section-title` for clarity, of
 course the class name is temporary and should be changed in something more
 appropriate
 - the `.clear-results` control is now a button and works with mouse, Enter
 and Spacebar as it's supposed to do natively
 - same for the `.customizer-screen-options-toggle`
 - same buttons missed the `type="button"` attribute, added

 Would definitely need some help and review. Tested on latest Chrome,
 Firefox and IE 8.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33184#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list