[wp-trac] [WordPress Trac] #25103: Submit buttons on form fields in the Add Media panel
WordPress Trac
noreply at wordpress.org
Mon Sep 19 20:35:19 UTC 2016
#25103: Submit buttons on form fields in the Add Media panel
-------------------------------------+-------------------------------------
Reporter: johnbillion | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Media | Version: 3.5
Severity: normal | Resolution:
Keywords: needs-patch uniform- | Focuses: ui, accessibility,
search | javascript
-------------------------------------+-------------------------------------
Comment (by afercia):
Discussed a bit this ticket at today's accessibility weekly meeting and we
should distinguish two different cases:
'''Search input field'''
This kind of "live" search needs to inform users the content below is
going to return search results "as they type", WordPress is already doing
this in some other screens, for example the Themes search, and there's
also #31818 that aims to review all the searches in the admin.
'''Selects'''
There's a historical difference in the way browsers implement the `change`
event on `<select>` elements. The current specification
([https://www.w3.org/TR/DOM-Level-2-Events/events.html#Events-
eventgroupings-htmlevents-h3 Dom events level 2]) states:
> The change event occurs when a control loses the input focus and its
value has been modified since gaining focus.
Firefox is the only browser I'm aware of that does this right. Other
browsers fire the event when the select value has changed '''and it still
has focus'''. When it comes to keyboard navigation, the behaviour changes
also depending on the platform used. For example on Windows and Chrome,
using the arrows to change the select options without actually opening the
select, immediately fires the change event and triggers an unexpected
change of the content.
Given this different implementations, our recommendation is to ensure
users are always in control on what is going to happen and thus the
`change` event on select elements should be avoided. For consistency
across platforms/browsers and for better accessibility, selects should
always use a button.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/25103#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list