Page MenuHomePhabricator

Need a stable marker for title pronunciation sources in HTML
Open, MediumPublic

Description

Reach out to the communities to add a more stable marker in the HTML output for pronunciations.
en:Template:IPA_audio_link.

This could be a data-* or class attribute, ideally directly on the anchor with the href to the source of the pronunciation ogg file.
Suggestions:

  • data-type="pronunciation"
  • data-type="ipa"
  • class="ipa-src"

Where should we bring this up? WP:VPT?

Once that is done we can fix the pronunciation detection in the /page/media, /page/mobile-sections, and /page/mobile-html endpoints. (mobile-sections works but only because of a hack).

Event Timeline

VPT and the WikiProject Templates talkpage, I'd guess. And after they add the class and it turns out to work well, add it to the CSS classes catalogue and the mw.org equivalent, and notify other communities.

As for the markup, there doesn't seem to be any convention out there (I'm a bit surprised since pronunciation is pretty basic stuff but that's how it is - there is rel=pronunciation but only for external pronunciation data files). I think for things not intended for styling, data attributes are usually better than CSS classes as there is less chance of accidental collision. Something like data-type=pronunciation? (With data-ipa-src what would be the value?) The flip side is that in a browser it's less performant as CSS classes are put in a special lookup table; not sure if that applies to Domino.

What @Tgr said, basically. What "notify the other communities" means isn't self-explanatory, but might be as simple as an item in Tech News.

Is there a convention for naming the HTML attribute to mark the pronunciation source?

The name probably shouldn't include "ipa", as there might be communities that have added pronunciation templates for audio links that don't use IPA.

@bearND Feel free to update the description with more detail and the priority/column/board if needed depending on your thoughts.

Adding Content-Transform-Team as Product-Infrastructure-Team-Backlog-Deprecated has been deprecated for a while, and as open valid tasks shall not be ignored and forgotten only because WMF internally reorgs without much change management in place (cf T328586).

Related to a huge number of other bugs making tweaks in summary stripping, eg T330188: Remove duplicate parenthesis stripping in /page/summary logic.

@ssastry has some ideas about semantic markup of templates, which would let you group all the pronunciation-related templates irrespective of CSS class.