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

WordPress Trac noreply at wordpress.org
Tue Aug 4 12:03:32 UTC 2015


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

Comment (by afercia):

 Thinking a bit about this, the Menu Customizer is new in 4.3 so we don't
 have to worry about visual backwards compatibility, correct? Please let me
 know if I'm missing something. If so, for the Menu Customizer we can
 change classes on divs that are not accordions, this would remove
 unnecessary events fixing a couple of issues like:

 the clear search results button that doesn't work when pressing Enter,
 currently the unnecessary events here are attached by `accordion.js`:
 [[Image(https://cldup.com/24V9oDsv3h.png)]]

 the Menu options toggle that doesn't work when pressing Enter:
 [[Image(https://cldup.com/ttWyVuhRsq.png)]]

 About the other cases, we can be a bit more specific when targeting divs
 that expand panels or sections and as far as I see they all have a
 `tabindex="0"` attribute so using `.accordion-section-title[tabindex="0"]`
 should work. This would avoid to attach unnecessary events on divs that
 don't need them and fix other things, for example the Widgets Help toggle
 that doesn't work when pressing Enter:
 [[Image(https://cldup.com/o0UbG5K3Mw.png)]]

 Thoughts?

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


More information about the wp-trac mailing list