Page MenuHomePhabricator

CX source selector has no focus state
Closed, ResolvedPublic

Description

image.png (94×521 px, 5 KB)

This is not good for accessibility.

The similar OOUI search widget just keeps the text widget outline:

image.png (200×310 px, 43 KB)

which also works in monobook/apex

image.png (143×166 px, 8 KB)

Event Timeline

It does however have an error state:

image.png (100×592 px, 2 KB)

and a border-less pending state:

image.png (84×607 px, 4 KB)

The search bar is presented as a compound input element with some controls inside (in addition to the icon it has a language selector). In this case I think it makse sense to have the blue outline around the whole border as it happens in wikipedia.org or with the Flow input area:

Screen Shot 2017-10-05 at 11.58.12.png (215×526 px, 30 KB)
Screen Shot 2017-10-05 at 12.37.57.png (346×678 px, 32 KB)

So in the case of Content Translation it should look closer to this:

cx-new-dialog-search-initial copy.png (360×660 px, 28 KB)

Regarding the red error outine I think it should not be shown, I created a separate ticket about it (T177470).

Change 381246 had a related patch set uploaded (by Petar.petkovic; owner: Petar.petkovic):
[mediawiki/extensions/ContentTranslation@master] Embed New translation search results

https://gerrit.wikimedia.org/r/381246

Change 381246 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Embed New translation search results

https://gerrit.wikimedia.org/r/381246

Since the above patch there is now a 1px inset, although that should be 2px (and transitioned). Also if I tab out of the input I still see the inner outline of the input widget.

From a technical perspective, I think it will be much easier to increase the padding on the TextInputWidget, and absolutely position the language selector over it, as currently we are trying to override then recreate a lot of upstream styles. This is basically how the www.wikipedia.org portal version works. All the border states will then work automatically, as will the apex/monobook version.

Change 383540 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/ContentTranslation@master] Use input padding and absolute positioning on page selector

https://gerrit.wikimedia.org/r/383540

Checked in wmf.5 - the focus is present. But there is a weird state in monobook

Screen Shot 2017-10-27 at 4.59.52 PM.png (310×830 px, 28 KB)

As 383540 is still open, this is not fully resolved.

Change 383540 merged by jenkins-bot:
[mediawiki/extensions/ContentTranslation@master] Move language filter and close buttons to input's 'label' area

https://gerrit.wikimedia.org/r/383540

Re-checked (cx-testing and betalabs) - the fix works fine.

Screen Shot 2017-12-20 at 1.12.22 PM.png (356×940 px, 36 KB)

In monobook:

Screen Shot 2017-12-20 at 1.11.24 PM.png (230×930 px, 33 KB)