Page MenuHomePhabricator

The page translation language list should use HTML list instead of literal bullet points
Closed, ResolvedPublic

Description

Currently output of the page translation language list (<languages /> tag) uses a <div> in which the <a> tags are divided by literal bullet points. It should instead omit a HTML list (i.e. <ul><li>) for better accessibility, and the current design should be achieved by CSS, much like how class="hlist" works on enwiki and many other wikis (but, of course, it should not depend on on-wiki stylesheets).

BeforeAfter
Appearance
languagelist-appearance-before.png (242×475 px, 49 KB)
languagelist-appearance-after.png (242×475 px, 50 KB)
DOM
languagelist-dom-before.png (242×801 px, 52 KB)
languagelist-dom-after.png (241×802 px, 25 KB)

(Notice that on the after picture, the bullet points are no longer selected, since they’re inserted through CSS. Also, the lang attribute may be moved to the <li> element from the <a>; I don’t have a strong opinion on this.)

Event Timeline

Nikerabbit subscribed.

This sounds good to me. The code is in PageTranslationHooks::languages and it has an associated style module.

Hey everyone,
I wish to start working on this.
Can someone please guide me through?

Thank you so much!
@Tacsipacsi @Nikerabbit

Hi @Poornima7, thanks a lot for your interest! Do you have a more specific question?

I'm not able to locate the starting files, as in unable to locate PageTranslationHooks::languages
Can you help me with that? Is the installation of any software/library required for this?

Thank you for your time!

There’s a getting started guide that should help you setting up your development environment. Also, you can simply grep for class names in the repo using your favorite tool after you cloned it, or on the web (rETRA  has a regex search field in the upper right corner).

Change 718862 had a related patch set uploaded (by AntiCompositeNumber; author: AntiCompositeNumber):

[mediawiki/extensions/Translate@master] PageTranslationHooks: Use HTML list for language list

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

Change 718862 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] PageTranslationHooks: Use HTML list for language list

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