Page MenuHomePhabricator

Clear search input button is of no value for AT users
Closed, ResolvedPublic


The clear button <button class="mw-ui-icon mw-ui-icon-mf-clear mw-ui-icon-element mw-ui-icon-small clear" title="" style="">Clear</button> doesn't provide values of screenreader users.
It adds to navigation steps needed to search and deleting an input's value is simpler done without this button being exposed for those.

Expected result:
Should be hidden to AT users by adding aria-hidden="true"

Developer notes

It should be possible to pass an option to the Icon element that adds the attribute aria-hidden.
We could add a generic solution (e.g. allow an array of attributes to be added to the parent element) or a bespoke option for the aria-hidden option.

I guess it should default to hidden, unless explicitly stated otherwise.

Event Timeline

@Jdlrobson Icon() doesn't provide an option to add a certain attribute, what's the best way to move forward here?

Add it to the template with a suitable default value for the option.

ovasileva triaged this task as Medium priority.Nov 6 2018, 3:59 PM
Jdlrobson lowered the priority of this task from Medium to Low.Jul 31 2019, 6:55 PM

Given lack of activity here, low seems more appropriate.

Can anyone tell me that what are AT users and in which page I can find this button?

AT = assistive technology

This icon can be seen by:

Screen Shot 2021-01-13 at 4.24.25 PM.png (114×818 px, 7 KB)

it's the x on the far right.

Change 656108 had a related patch set uploaded (by Yash9265; owner: Yash9265):
[mediawiki/extensions/MobileFrontend@master] Clear search input button is of no value for AT users.

Change 656108 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Clear search input button is of no value for AT users.

Volker_E reassigned this task from Volker_E to Yash4357.

Looks good to me. Thanks @Yash4357!