Page MenuHomePhabricator

Wikimedia OCR: Weird tooltip for language selector
Closed, ResolvedPublic2 Estimated Story PointsBUG REPORT

Description

What is the problem?

The tooltip for the language selector produces weird output.

For example, selecting the "af" language and hovering over with mouse produces:

af
                            –
    Afrikaans

This appears to be related to the title attribute of the <li> element.

Steps to reproduce problem
  1. https://ocr-test.wmcloud.org/?langs[]=af
  2. Hover over the af - Afrikaans element

Expected behavior: Tooltip is af - Afrikaans
Observed behavior: Tooltip is as described above, with weird spacing

Environment

Wikimedia OCR: https://ocr-test.wmcloud.org Version 0.5.0-3-g1bf762c

Event Timeline

Daimona subscribed.

https://github.com/wikimedia/wikimedia-ocr/pull/39

It took me quite a while to figure this out, since my browser wasn't displaying the whole whitespace thing when inspecting the vanilla selector in no-js mode, and I needed an actual "view source" to realize what's going on.

MusikAnimal subscribed.

Merged. Thanks for fixing this so quickly, @Daimona! I'm moving this to the QA column on the sprint board.

This looks good to me. The tooltip and the title attribute no longer have extraneous white-space.

As this is a small change, I will move straight into Done.

Test environment: https://ocr-test.wmcloud.org Version 0.5.0-6-g7729aec.

ldelench_wmf set the point value for this task to 2.Jun 10 2021, 8:40 PM