Page MenuHomePhabricator

Phonos attribution link (superscript "i") is not excluded from search and blends with the previous word
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
Snippets contain "listeni", "pronunicationi", etc. That is, the superscript "i" for the attribution link appears in search snippets with no whitespace preceding it.

What should have happened instead?:
Either the attribution link is excluded from the search, or a community can override the message (phonos-attribution-icon) so it is excluded from the search.

Other information (browser name/version, screenshots, etc.):
I tried overriding the message with <span class="navigation-not-searchable">i</span> on testwiki, but it was not interpreted as wikitext and the raw code appeared as the link text (see F37643902).

When the text inside the phonos tag is a generic description like "listen" or "pronunciation", it's probably not controversial to wrap the whole tag in <span class="navigation-not-searchable">...</span>, but sometimes the text inside the tag is meaningful content (example). The lack of whitespace could trip up not only searching but screen readers and whole-word find-in-page.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Nikerabbit removed a project: Language-Team.

Change 957991 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Phonos@master] Phonos: prevent attribution link from appearing in search results

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

Change 957991 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: prevent attribution link from appearing in search results

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

dom_walden subscribed.

The i (or (i)) no longer appears in search results.

Before:

search_i_before.png (152×636 px, 27 KB)

After:

search_i_after.png (124×726 px, 14 KB)

If the Phonos button has a label, the text of the label will appear. But, according to the description, this is something we might want.

search_i_label.png (137×614 px, 20 KB)

Test environments: https://en.wikipedia.beta.wmflabs.org and https://es.wikipedia.beta.wmflabs.org Phonos 0.1.0 (3af4159) 08:16, 21 September 2023.

Examples: