Page MenuHomePhabricator

Support arbitrary autocomplete values in OOUI\TextInputWidget
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/#/c/322138/ adds support for the autocomplete parameter in HTMLTextField but OOUI\TextInputWidget expects a boolean. It should instead transform boolean values to on/off but accept anything else as well (see https://html.spec.whatwg.org/multipage/forms.html#autofill for the full range).

Event Timeline

Anything, or one of the select strings?

(Also, would we want to implement as AutocompletableTextInputWidget?)

IMO validating is not worth the effort (I didn't add any to HTMLTextField).

Note that textfields are autocompletable by default (or more precisely take their default from the parent form, which defaults to on). This attribute can be used to turn off or restrict that. (TBH I have no idea if it's useful or even has browser support. I just wanted to add support for autocomplete=off to HTMLTextField and figured there is no point in disallowing the other values described in the spec; then it was pointed out in CR that OOUI interprets the parameter differently.)

Change 630355 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[oojs/ui@master] TextInputWidget: support non-boolean autocomplete values

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

Change 630356 had a related patch set uploaded (by Gergő Tisza; owner: Gergő Tisza):
[mediawiki/core@master] HTMLTextField: support non-boolean autocomplete values in OOUI

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

Change 630355 merged by jenkins-bot:
[oojs/ui@master] TextInputWidget: support non-boolean autocomplete values

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

Change 632805 had a related patch set uploaded (by VolkerE; owner: VolkerE):
[mediawiki/core@master] Update OOUI to v0.40.4

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

Change 632805 merged by jenkins-bot:
[mediawiki/core@master] Update OOUI to v0.40.4

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

Change 630356 merged by jenkins-bot:
[mediawiki/core@master] HTMLTextField: support non-boolean autocomplete values in OOUI

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

Tgr claimed this task.

Thanks all!