Page MenuHomePhabricator

Table: remove hardcoded English strings
Closed, ResolvedPublic

Description

Overview

While our team is preparing to create an i18n system in Codex, we want to avoid using hardcoded English strings in Codex components.

Currently, the Table component has hardcoded English strings for sort directions ("ascending" and "descending"). There is also an aria-label on the sort icon with a hard-coded English string, but this is no longer needed since the icon is aria-hidden and the button has an accessible label, plus aria-sort on the <th> element (see APG for an example)

Acceptance Criteria

  • Remove the sort icon label.
  • Add a prop for sort direction strings so users can bass in translated text
  • Add a note about this prop to the docs

Event Timeline

AnneT changed the task status from Open to In Progress.Mon, May 20, 9:37 PM
AnneT claimed this task.

Change #1034547 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[design/codex@main] Table: Improve translatability of a11y text for sort order

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

Change #1034547 merged by jenkins-bot:

[design/codex@main] Table: Update a11y text for sort order

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

Change #1037103 had a related patch set uploaded (by Anne Tomasevich; author: Anne Tomasevich):

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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

Test wiki created on Patch demo by ATomasevich (WMF) using patch(es) linked to this task:
https://patchdemo.wmflabs.org/wikis/ce0a74a0e6/w

Change #1037103 merged by jenkins-bot:

[mediawiki/core@master] Update Codex from v1.6.0 to v1.6.1

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