WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Clear text within search edit field

for

From: Abi James
Date: Sep 14, 2024 1:24PM


It sounds like the functionality in the original query maybe part of an input type=search element. Some browsers display an x button within the input, others don’t (see MDN example https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search#differences_between_search_and_text_types). On those browsers that display it, there is usually a keyboard function to clear the input (ESC on chromium browsers). Even on iOS there is a keyboard undo function even if the x button is not displayed. There is also an argument that x button isn’t author created content as it I generated by the browser so out of scope of WCAG.

While it is laudable to argue to think beyond WCAG (I support teams who’ve worked hard to make that clear input function fully accessible), if you argue that all interactive elements have to be in the tab key focus order, you are then risking making navigating webpages by keyboard even slower. And you’d be arguing that common keyboard patterns for complex widgets like dropdowns, autocompletes and tab panels are not compliant as they rely on non tab key controls.

In situations where (non) standard keyboard functions can’t be avoided it’s as beneficial to think about how to help improve discoverability of keyboard commands as much as the technical solution. I have been caught out by how people who are starting to have to rely on a keyboard can have limited awareness of the basic concepts of keyboard commands.

Regards

Abi James
Digital accessibility consultant & researcher

On 14 Sep 2024, at 20:00, Steve Green < <EMAIL REMOVED> > wrote:

CAUTION: This e-mail originated outside the University of Southampton.

The button for clearing the content is not displayed until something is entered in the text field. Then it is displayed, but does not receive focus. The original post does not say if a role or accessible name is exposed in browse mode.

Steve