Page MenuHomePhabricator

Disable auto-capitalization hint on search field of wikis with $wgCapitalLinks = false
Open, Stalled, LowPublic

Description

Since Wiktionary is case-sensitive on first character ($wgCapitalLinks is set to false), searching lower-case titles on mobile could be frustrating if auto capitalization is enabled. The fix is just adding autocapitalize="off" to the search <input> element.

Maybe this can be automatically done in any wiki that disabled $wgCapitalLinks?

Developer notes

Using $wgCapitalLinks sounds fine. It may require copying across the autocapitalize property in the client.

Event Timeline

Betseg created this task.May 2 2020, 7:56 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 2 2020, 7:56 AM
Betseg triaged this task as Low priority.May 2 2020, 7:57 AM
Betseg updated the task description. (Show Details)

Hi @Betseg, thanks for taking the time to report this and welcome to Wikimedia Phabricator!
Do you plan to work on fixing this task, as you set the priority of this task?

Betseg raised the priority of this task from Low to Needs Triage.May 2 2020, 9:43 AM
Jdlrobson added a subscriber: Jdlrobson.

I assume this is the Minerva skin?

Betseg added a comment.May 8 2020, 5:25 PM

I meant Minerva as "mobile", yes. Sorry if that was ambiguous.

Jdlrobson moved this task from Incoming to Needs Prioritization on the Readers-Web-Backlog board.
ovasileva triaged this task as Medium priority.Jun 8 2020, 10:15 AM
This comment was removed by Betseg.
Betseg updated the task description. (Show Details)Aug 28 2020, 10:53 AM
Betseg updated the task description. (Show Details)

Maybe this can be automatically done in any wiki that disabled $wgCapitalLinks?

Shouldn't this be done by core then? Or is Minerva overriding something?

Presumably this needs to be done in SkinMustache::buildSearchProps in core, yes as part of the making of html-input

ovasileva lowered the priority of this task from Medium to Low.Sep 23 2020, 8:47 AM

Sounds like a fast-yet-effective fix to this problem. Not sure why the priority got lowered since more and more people are using their smartphone to browse the Wiktionary.

@DSwissK: Other things unfortunately became more important in the meantime. Contributed patches are highly welcome if you'd like to see this fixed. :)

Change 635286 had a related patch set uploaded (by Ammarpad; owner: Ammarpad):
[mediawiki/core@master] Respect $wgCapitalLinks in Search input field

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

Ammarpad renamed this task from Disable auto-capitalization on mobile Wiktionary search bar to Disable auto-capitalization hint on search field of wikis with $wgCapitalLinks = false.Oct 21 2020, 12:03 AM

Since Wiktionary is case-sensitive on first character ($wgCapitalLinks is set to false), searching lower-case titles on mobile could be frustrating if > auto capitalization is enabled. The fix is just adding autocapitalize="off" to the search <input> element.

Let me clarify one thing here to avoid misunderstanding after the change, because this task description is assuming something which will not happen.

Note that, there's no any "auto capitalization" on search input text (not the result) of MediaWiki, even on https://en.wiktionary.org/wiki/Special:Search. If you change the case of your (virtual) keyboard, there's nothing that will modify your input to enable the supposed capitalization. (except maybe local userscript)

The attribute is not well-named, because it actually does not enable "auto capitalization". What it does is to effect change to the initial state of virtual keys based on the value. So don't think that your input will automatically be lowercase after this change. It won't. (Only the virtual keys will be). If you toggle the upper case before typing, you'll see upper case in the search field, nothing will change them back to lowercase.

Also, if you're using physical keyboard, you'll not see any change. If you're typing in Wiktionary that uses a unicameral script, you'll not see any change. Nothing at all.

Yes, that's exactly what we need in Wiktionary : virtual keyboard not upercasing the first letter by default.

OK, that's good to hear.

Change 635286 merged by jenkins-bot:
[mediawiki/core@master] Respect $wgCapitalLinks in Search input field

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

Jdlrobson changed the task status from Open to Stalled.Oct 22 2020, 6:37 PM