Page MenuHomePhabricator

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


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

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

  • 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

bearND triaged this task as Normal priority.Jan 23 2019, 11:07 PM
bearND created this task.
Tgr added a comment.Jan 24 2019, 3:42 AM

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 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.

bearND removed bearND as the assignee of this task.Feb 6 2019, 4:48 PM
Jhernandez added a subscriber: Jhernandez.

@bearND to figure out CL support for this.

bearND updated the task description. (Show Details)Feb 6 2019, 4:58 PM
bearND added a subscriber: Johan.
Johan added a comment.Feb 7 2019, 3:57 AM

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.

bearND added a comment.Feb 7 2019, 4:02 AM

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

Johan added a comment.EditedFeb 7 2019, 5:51 AM

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.