[wp-trac] [WordPress Trac] #50846: Customize: Add Widget on Mobile does not Auto-Focus Widget Search

WordPress Trac noreply at wordpress.org
Tue Aug 4 17:21:58 UTC 2020


#50846: Customize: Add Widget on Mobile does not Auto-Focus Widget Search
-------------------------------------------+-----------------------------
 Reporter:  jeryj                          |      Owner:  (none)
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  Customize                      |    Version:  trunk
 Severity:  normal                         |   Keywords:
  Focuses:  ui, accessibility, javascript  |
-------------------------------------------+-----------------------------
 On mobile devices, the search input does not receive focus after clicking
 the Add a Widget button.

 To reproduce, on a mobile device or emulator (this is device dependent,
 not screen size, so you can't just reduce your desktop browser width):
 - Go to the Customizer
 - Select "Widgets"
 - Select the "Add a Widget" button
 - Widget Search will open, but focus is not placed within the search.
 Focus remains on the Add a Widget button, so screen readers don't have
 immediate access to the new overlay

 I believe the fix, if this method is approved, would be to remove the
 mobile check before focusing from `wp-admin/js/customize-controls.js` on
 [line 367 -
 369](https://github.com/WordPress/WordPress/blob/3dd9628aae507ee027757b7c9c17506d4ff45ef8
 /wp-admin/js/customize-widgets.js#L367-L369) that was added by
 https://core.trac.wordpress.org/changeset/32243.

 Apologies for the Github link, I couldn't track down the `customize-
 controls.js` file in trac.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50846>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list