Page MenuHomePhabricator

[MEX] Use appropriate input direction for statement values in RTL interfaces
Closed, ResolvedPublic

Description

Problem

When viewing an item in Arabic, some statement value inputs use RTL direction even when their values use numeric or technical syntax, such as coordinate location.

Proposed behavior

Set the direction of individual value inputs according to their datatype and expected content, independently of the interface language.

Use LTR for:

  • Globe coordinate: coordinate value inputs.
  • Quantity: amount, bounds and tolerance inputs.
  • URL: URL inputs.
  • Mathematical expression: formula source inputs.
  • Musical notation: LilyPond source inputs.

Needs verification:

  • External identifier
  • Point in time

Arabic field labels, unit labels and surrounding controls should retain their appropriate direction.

Acceptance criteria

  • The inputs listed for LTR use explicit LTR direction in an RTL interface.
  • The behavior applies consistently to main statement values, qualifiers and references.
  • Direction is applied to the input values.
  • RTL text remains correctly supported in language-aware inputs.
  • Existing LTR interface behavior remains correct.

Screenshot:

image.png (522×747 px, 44 KB)

Event Timeline

Story writing notes:
Use the documentation here to determine which value inputs should be changed to LTR in the RTL UI:
https://doc.wikimedia.org/codex/latest/style-guide/bidirectionality.html#phone-numbers

Please note that some will still require verification.

Change #1343504 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Fix text direction as left-to-right for URL input and display

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

Change #1343948 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Force left-to-right display for mathematical inputs

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

Change #1343950 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Score@master] Force left-to-right display for musical notation inputs in wbui2025

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

Change #1343959 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Fix text direction for globe-coordinate value inputs to left-to-right

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

Change #1343966 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Fix text direction for quantity value inputs to left-to-right

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

Change #1344196 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Score@master] Upgrade cypress to latest 15.x version

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

Change #1344198 had a related patch set uploaded (by Arthur taylor; author: Arthur taylor):

[mediawiki/extensions/Wikibase@master] Force left-to-right display for external-id inputs

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

I've added patches for:

  • Globe coordinate
  • Quantity
  • URL
  • Mathematical expression
  • Musical notation
  • External Identifier

For point-in-time, I left the input as it is - RTL. Comparing the behaviour in the current desktop UI, as far as I can see we *only* have LTR inputs for all datatypes in all languages, so technically the behaviour for point-in-time is now a change vs. the desktop. But as I understand the input guidelines, that's probably okay.

Change #1343959 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix text direction for globe-coordinate value inputs to left-to-right

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

Change #1343504 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix text direction as left-to-right for URL input

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

Change #1343948 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Force left-to-right display for mathematical inputs

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

Change #1344196 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Upgrade cypress to latest 15.x version

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

Change #1344198 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Force left-to-right display for external-id inputs

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

Change #1343950 merged by jenkins-bot:

[mediawiki/extensions/Score@master] Force left-to-right display for musical notation inputs in wbui2025

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

Change #1343966 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] Fix text direction for quantity value inputs to left-to-right

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

Could not check musical notation because it is disabled. Everything else seems fine!