#microformats 2017-07-10

2017-07-10 UTC
davidmead, AngeloGladding, [kevinmarks], [miklb], billbennettnz, [eddie], [pfefferle], adactio, barpthewire, [jemostrom], tantek, [xavierroy], KartikPrabhu, [jeremycherfas], [chrisaldrich], cheim and gRegorLove joined the channel
#
@jonmoshier
what's the best way to put contact info in an email? talking 'one-click->add to contacts' easy. vcard, rich snippets, microformats?
(twitter.com/_/status/884486323381440514)
KartikPrabhu, [colinwalker], barpthewire, tantek and snarfed joined the channel
#
snarfed
hi all! i'm using mf2. i'm trying to get the alt text from an img.u-photo, but it seems like alt isn't guaranteed to make it into parsed mf2. it only shows up in the outer object's name property as a fallback, if there's no p-name. is that right?
#
snarfed
e.g. this HTML parses to name = ["alt"]:
#
snarfed
</article>
#
snarfed
<img class="u-photo" src="/photo.jpg" alt="alt" />
#
snarfed
<article class="h-entry">
#
snarfed
but this HTML parses to name = ["name"], and "alt" is missing entirely:
#
snarfed
<span class="p-name">name</span>
#
snarfed
<article class="h-entry">
#
snarfed
<img class="u-photo" src="/photo.jpg" alt="alt" />
#
snarfed
</article>
#
aaronpk
there's been some talk about pulling the alt attribute out specifically, but i think it's only brainstorming at the moment!
#
Loqi
[aaronpk] #2 image alt text is lost during parsing
#
Loqi
[miklb] #756 Support for alt text on images posted to Twitter
#
snarfed
thanks!
#
aaronpk
i think it's implemented in one or two of the parsers, possibly behind a feature flag
#
snarfed
ooh will look
snarfed, [chrisaldrich] and [shaners] joined the channel
#
[shaners]
i’m +1 on using alt attr in the fallback chain
[kevinmarks] and [miklb] joined the channel
#
gRegorLove
By fallback chain, do you mean the implied parsing rules for "name" property? http://microformats.org/wiki/microformats2-parsing#parsing_for_implied_properties
#
Loqi
[Tantek Çelik] microformats2 parsing specification
#
gRegorLove
That's a bit different than aaronpk's brainstorm (which I think is a good idea)
#
KartikPrabhu
how does a comsumer know if some property is supposed to be an image and hence look for the parsed "alt"?
#
KartikPrabhu
mf2 does not tell you where a particular property came from
#
gRegorLove
Certain properties like "photo" are usually a URL. Consumers can check if it's a object (similar to e-content) and if so use it's "value" or "alt" as needed
#
gRegorLove
If you're referring to the brainstorm
#
[shaners]
gRegorLove: Yeah. Sorry that was mismatched terminology. I think alt should be considered for the name parsing rules.
#
[shaners]
That said, I don’t have the cycles to implement it in the ruby parser. So, ¯\_(ツ)_/¯
#
gRegorLove
It is if the <img> is inside the p-name
#
[shaners]
oh great
#
gRegorLove
Let me double check that actually. *should* be afaik
#
[shaners]
I never knew that. ?
#
gRegorLove
Probably makes more sense as an h-card there, but same rules apply
#
[shaners]
thx for clarifying, g.
#
[shaners]
sorry for the fly by opinionating.
#
gRegorLove
no worries!
tantek and AngeloGladding joined the channel