#microformats 2017-11-21

2017-11-21 UTC
[manton], webchat45, webchat369, [miklb], KartikPrabhu, tantek, [jackysee], webchat35, [pfefferle], nitot, [kevinmarks], adactio and webchat167 joined the channel
#
webchat167
#stripe
webchat29, [markmhendrickso and [keithjgrant] joined the channel
#
[keithjgrant]
@tanktek I drew up a couple codepens to illustrate the questions I've run into
#
[keithjgrant]
I'd wager others have already dealt with the first issue. I may just be misunderstanding something
#
KartikPrabhu
[keithjgrant]: I think aaronpk ran into the first one.
#
sknebel
[keithjgrant]++
#
Loqi
keithjgrant has 1 karma in this channel (15 overall)
#
KartikPrabhu
For the second one you could wrap the entire comment in a <div> and make the comments into grid containers
#
sknebel
but then each of them is it's own grid, and picks the widths independently?
#
KartikPrabhu
sknebel: aah I see. yes
[kevinmarks] joined the channel
#
[kevinmarks]
You can put the url around the avatar, and use alt for the name so that is the h-card
#
[keithjgrant]
Oh cool. So a 'p-name' on an <img> refers to the alt?
#
[keithjgrant]
On the grid issue, hopefully subgrid & the level 2 spec will mature soon and present a better way
KartikPrabhu joined the channel
#
KartikPrabhu
[keithjgrant]: sknebel: wrapping each comment with a <div class="comment"> and setting it to "display: contents" works. However I think only FF supports this for now
#
KartikPrabhu
[keithjgrant]++ for documenting these problems
#
Loqi
keithjgrant has 2 karma in this channel (16 overall)
#
sknebel
[keithjgrant]: yes, alt-text works for p- (http://microformats.org/wiki/microformats-2-parsing#parsing_a_p-_property for all the details). not sure that's an appropriate alt text though (especially if you have the name written out next to it), but that's a question for someone with more a11y knowledge (Zegnat?)
#
Loqi
[Tantek Çelik] microformats2 parsing specification
#
KartikPrabhu
[keithjgrant]: yes p-name on img will pick up the alt. But that would have accesibility issues as the comment-author name will be announced twice on screen-readers (I think)
#
Zegnat
Yes, it will be announced twice. You could theoretically block the author name text from being read with aria-hidden though. But I am not sure you really want to go to that trouble
#
[keithjgrant]
I think Chrome added display: contents also. That might be the way to go, with a reasonable column width hard-coded as fallback for other browsers
#
KartikPrabhu
[keithjgrant]: yes using @supports should be good here
#
Zegnat
I’d almost be more inclined to just add a <data class="u-photo"> within the h-card and not try to force extra semantics on the IMG element
#
KartikPrabhu
Zegnat: yes. that sounds better. But also "hidden data" problem
#
Zegnat
Using the alt tag for p-name is, in a way, also hidden data imho
#
sknebel
yeah, both alt= and data are hidden, but seems hard to avoid
#
Zegnat
Especially since the name is right next to it.
#
Zegnat
So either way you are duplicating data (either IMG URL or name text)
#
Zegnat
And I would rather not overload the IMG element
#
Zegnat
I am not actually sure what the recommended alt text for display pictures is these days. But I bet there is one. Better off sticking with that
#
KartikPrabhu
Zegnat: for purely presentational images (which this would be ) it is alt=""
#
Zegnat
I wouldn’t say the photo’s of people’s faces are decorative
#
KartikPrabhu
I would if the name is right next to it
#
KartikPrabhu
if it were only an image I would put the name as alt
#
Zegnat
I once read an article by a screenreader user who said alt="" is very annoying for these things because people around them would refer to images. And even if they couldn’t see it, they wanted to know the image was there.
#
Zegnat
Which is why I think how much a display picture of a person counts as purely decorative and not-for-the-user is debatable.
#
Zegnat
But again, would need to find someone who wrote about the topic to know the current best practice. Don’t have it at my fingertips
#
sknebel
so …alt="avatar of"> Erwin Müller ? mh
#
[keithjgrant]
I wish there was a way to say the mf of element X is associated with the h-* defined by element Y. Kind of like a <label>’s for attribute can reference an arbitrary <input> on the page.
#
KartikPrabhu
[keithjgrant]: you are getting into Schema-type stuf now! :P
#
[keithjgrant]
What's that?
#
Zegnat
alt="" is probably right, upon scrolling through some quick resources. As any description of the person’s display picture would offer redundant information to the text right next to it (their name), and for redundancy reasons alt="" is apparently fine. See e.g. https://www.w3.org/WAI/tutorials/images/decision-tree/ and https://webaim.org/techniques
#
KartikPrabhu
wonders if alt="name" with role="presentation" works?
#
Loqi
zegnat has 5 karma in this channel (149 overall)
[miklb] and [manton] joined the channel
#
Zegnat
BTW, [keithjgrant], I know some people don’t like doing this but you don’t have to use an h-card on the h-entry and can instead just use u-author
#
[keithjgrant]
Good to know. Thx
#
Zegnat
So then you only need to be able to nest that one URL somewhere in the h-entry. There is some discussion about the authorship algorithm that might then even allow matching an h-card *within the current document* if it has the same u-url.
#
Zegnat
So you could have h-card outside of the h-entry, have u-author on h-entry match the u-url on the h-card, and some parsers will pick that up no problem
#
Zegnat
I believe X-Ray does it that way right now (possibly, maybe, discussion pending, ... ;) )
#
aaronpk
I thought that was all solidified in the authorship algorithm?
#
aaronpk
XRay implements that
#
sknebel
authorship does not look for h-cards on the same page
#
sknebel
if they are not the author property
#
sknebel
[keithjgrant]'s example also looked like possibly comment markup to me, where there'd be many entries with differing authors on a page
#
[keithjgrant]
Yeah. Both my examples came up while working on comments
#
aaronpk
oh, just a dangling h-card?
webchat257 and nitot joined the channel
#
sknebel
see the codepens above - markup examples where fitting h-card under the h-entry wasn't easily possible
#
aaronpk
on my own site i've solved that by using a hidden element to set the u-author property inside the h-entry
#
aaronpk
just to link the two together for the authorship algorithm
#
sknebel
so it goes into "fetch their homepage" mode instead of getting the info locally
#
sknebel
I think that was what zegnat suggested: if there is an h-card in the current document that can provide details, use that instead of fetching an additional document
#
aaronpk
no, I also have an h-card on the page, but setting the u-author property tells the authorship algorithm to use the on-page h-card
#
sknebel
right, still fetches the other doc
[jeremycherfas] joined the channel
#
sknebel
that was the discussion point
#
aaronpk
no it doesn't
#
sknebel
it does, because 7.1-3 come before 7.4
#
sknebel
it goes first checking if there is an h-card on the linked page, and then falls back to the current one
#
Zegnat
This is a great usecase for looking for h-card on the same page *before* fetching the external resource BTW
#
aaronpk
okay yeah that's what I was saying about moving 7.4 up to the first part of 7, because fetching the URL should be the last resort
#
Zegnat
Should document this ...
#
aaronpk
but as written, step 7.4 ends up using the h-card that's already on the page anyway
#
aaronpk
not the one at the author URL
#
sknebel
only if there is no h-card at the author url
#
sknebel
Zegnat: some start of that under https://indieweb.org/authorship#Other_theoretical (might even be by you)
#
sknebel
so you're right, I forgot 7.4 can happen at the end, but it really happens at the end
#
sknebel
he, yes, Zegnat the last edit to the page was by you
#
Zegnat
Yes, that was me
[pfefferle], [kevinmarks], tantek and KartikPrabhu joined the channel
vivus, [chrisaldrich], [kevinmarks] and webchat330 joined the channel
#
yufanisa
edited /irc (+30) "/* Quick Start */"
(view diff)
#
schmarty
tantek: ^^ spam
#
schmarty
reverted, but could us a block for that user.
KartikPrabhu joined the channel