#microformats 2020-02-12

2020-02-12 UTC
KartikPrabhu joined the channel
#
gRegorLove
peeks in "let me see if I'm a WP admin"
#
gRegorLove
I know I had a login for my post a couple years ago but not sure I remember it
#
gRegorLove
reset worked. looks like I'm just an author, not an admin
[chrisaldrich], chimo, KartikPrabhu, [jgmac1106], [Jeff_Hawkins], [xavierroy], [Michael_Beckwit, [tantek], [LewisCowles], [jeremycherfas], [grantcodes], tsrt^, [manton], [snarfed], IWSlackGateway, [schmarty], [KevinMarks] and ivc joined the channel
#
Zegnat
I think I am also just an author, should be able to check in a bit though
[chrisaldrich] and gRegorLove joined the channel
#
Zegnat
Just an author here too, only see my own posts in the admin interface looks like
#
Zegnat
Apparently I still have a draft standing :o
#
GWG
Hi, Zegnat
#
Zegnat
Hellow GWG :)
[tantek] joined the channel
#
GWG
Zegnat, what do you think about multiple rel values?
#
Zegnat
I like them. Some URL can express being author as well as me simultaneously. Or both your indieauth and token endpoint simultaneously. Etc.
#
Zegnat
I do not know how I feel about treating multiple rel values as having a singular meaning when they stand together. But I think that is specced as a possibility?
mauz555 joined the channel
#
GWG
I believe it is noted as correct
#
GWG
Doesn't rel="home alternate" mean it's the home page and it's an alternate independently? (as asked [1], [2], [3])
#
GWG
No. That's not how rel works. Rel values combine. E.g. rel="alternate stylesheet" has worked this way for over a decade. Rel values also combine with other attributes, e.g. use rel="alternate" media="handheld" on a link to a separate mobile-specific version of a page. Tantek 20:56, 10 August 2011 (UTC)
[Aaron_Klemm] joined the channel
#
Zegnat
Yeah, alternate specifically defines itself as changing meaning depending on other factors: https://html.spec.whatwg.org/multipage/links.html#rel-alternate
#
Zegnat
Though I think it is the only keyword to do so?
#
Zegnat
Haven’t brushed up on rels for a while
#
GWG
Zegnat, rel-home does as well
#
GWG
I wrote a whole post after rereading
#
GWG
I am hoping to get some clarity
#
Zegnat
Feels to me like rel-home introduces an extra case to the alternate in addition to what is already speced in the HTML spec. Seems fine to me.
#
Zegnat
I think rel-feed is nice in addition to rel-alternate as rel-alternate is specced to only refer to a feed together with 2 specific type-attributes. While rel-feed gets to widen this to any document type, e.g. JSON.
#
Zegnat
So seems like you are pretty much spot on in all your descriptions in your blog post, GWG
#
Zegnat
Anything specific you still feel unclear about? Or would you just like more eyes on the discovery algo you penned?
#
GWG
More eyes to refine it, yes
#
GWG
Also, parsed mf2 doesn't show combined rels
#
Zegnat
Ah, hmm, that is an interesting problem with the rel parser indeed
#
GWG
Yes
#
GWG
Thoughts?
#
[tantek]
no it does show combined rels
#
[tantek]
you're not looking in the right place in the results 🙂
#
[tantek]
look more closely
#
Zegnat
It does on the per link one
#
Zegnat
I am just thinking if that may be creating weird edge cases, because it merges all the rels from different <link> elements, right?
#
GWG
Under rel-urls or rels?
#
Zegnat
<link href="a" rel="thing"><link href="a" rel="alternate"> will turn into { "a": { "rels": ["thing", "alternate"] } }
#
Zegnat
GWG: rel-urls
KartikPrabhu joined the channel
#
Zegnat
So the parser output makes no difference between the two links created, and the one like created with rel "alternate thing"
#
Zegnat
I can’t think of any reason this is a problem in the wild though
#
[tantek]
Zegnat, nothing weird there
#
[tantek]
same semantic whether on one link element or multiple like that
#
Zegnat
[tantek]: not according to the spec for alternate. It is very clear that it needs to be on the same element
#
Zegnat
E.g. for stylesheets: “If the element is a link element and the rel attribute also contains the keyword stylesheet”
#
Zegnat
That cannot be checked with the mf2 output
#
Zegnat
Although I do not see any practical reason why we would care
#
Zegnat
<link rel="stylesheet" href="style.css"><link rel="alternate" href="style.css"> makes very little sense.
#
GWG
I only use rel, so I need to switch to rel-urls
#
[tantek]
I think that "same element" semantic is specific *only* to "stylesheet", so yeah that's true. However there's no use-case anyone's found to worry about that from an mf2 perspective
#
Zegnat
But theoretically that should mean the first link is to the main stylesheet, the second to an alternative representation of the current document. It does not mean style.css is an alternative stylesheet. But that latter is what one would think when looking at the mf2 output
#
Zegnat
[tantek]: I agree with that, like I said, I see no practical case where this could go wrong.
#
[tantek]
we could perhaps add a warning about the "stylesheet" value in particular, but I don't expect anyone will do any stylesheet reasoning using an mf2 parser. that would be quite odd
#
Zegnat
<link rel="home" href="a.html"><link rel="alternate" href="a.html"> - would surely have the same limition, in that per HTML spec this is defining 2 unique “links”. Neither of them claiming that a.html is a feed for the homepage. But the mf2 output would suggest that it is.
#
Zegnat
Nonsensical example again, because the sheer semantics of it seem super wrong :P
#
[tantek]
alternate does not mean feed all by itself
#
Zegnat
And I do not know any rel values other than alternate that this is important for, so ... meh? Seems fine to use rel-urls
#
[tantek]
that's the bigger problem with your reasoning
#
Zegnat
No, it means alternative representation
#
[tantek]
you said "feed for the homepage"
#
Zegnat
Yes, from mf2 it looks like feed for the homepage, because mf2 might think there was a link to a.html with the rels "home alternate" on it at once
#
Zegnat
And that is defined as a feed for the homepage
#
Zegnat
But in fact, the HTML never claimed that
#
Zegnat
Oh, hmm, or I am reading rel-home wrong and that one actually *also* requires a type
#
GWG
So should more people do rel-home alternate on feeds?
#
Zegnat
Ah, it seems like I was mistaken and it also requires type. Woops. So for the mf2 output to be wrong(-ish) you need even more convoluted examples that are even less likely to go wrong in the real world!
#
Zegnat
<link href="a" rel="home"><link href="a" rel="alternate"><link href="a" rel="ignorable" type="application/atom+xml"> - Never declares a feed, but the mf2 output might suggest that a is in fact a feed of the homepage
#
Zegnat
But even I find this to be too much of an edge-case :P
#
Zegnat
GWG: for now a small tweak to your algo is that whenever rel-alternate is considered, you also need to consider the type value. Only together with a feed type is it considered to mean feed.
#
Zegnat
According to the WHATWG spec it is only a feed when the type is either application/rss+xml or application/atom+xml.
#
GWG
Zegnat: That is pre-jsonfeed though
#
GWG
I have to account for that
#
GWG
Though annoyingly, their proposed mimetype isn't adopted yet
#
GWG
So there is an issue with application/json
#
Zegnat
Yeah, I am not sure it is a good idea to assume <rel="alternate" type="application/json"> can always be assumed to point at something following the JSONFeed spec.
#
GWG
It isn't
#
GWG
Because it could be a json representation of the page data
#
Zegnat
Exactly. Though the question again is how often you would run into that problem in the wild for real
#
Zegnat
Just as with my very weird theoretical example of tripping up mf2 rel parser with non-feeds
#
Zegnat
If nobody is doing it, it may be fine to assume the easy case. Worst case you will find out it isn’t a feed when you first fetch it, right?
#
GWG
Yes. I already check for it
#
GWG
So, then we get to the musings?
#
GWG
Could I do rel=feed author to indicate an author archive?
#
GWG
H-feed specifically
#
GWG
And so on
#
GWG
feed tag
#
GWG
And feed with datetime property?
#
Zegnat
Sounds logical? Although someone should define that rel-feed changes the meaning of rel-tag / rel-author in that case
#
Zegnat
I do not think datetime is a valid attribute on links though
#
Zegnat
And then there may be a period where people get confused with parsing. E.g. before they have understood that rel-feed changes the meaning of rel-author they may believe a page to have 2 distinct authors: <link rel="author" href="me"><link rel="feed author" href="my-feed"> = 2 authors me and my-feed.
#
GWG
I just want to be able to identify the type of feed
#
GWG
data then?
#
Zegnat
data how?
#
Zegnat
Also note that `tag`, with its current definition, is not allowed as a rel on <link> elements. So probably not going to be used for feed links up in the HTML head
#
GWG
Zegnat, data attributes are allowed on link elements
#
GWG
Ideas on how to proceed?
#
GWG
I have a use case
#
Zegnat
Oh, sure, but I seem to recall they are not meant to communicate information to external applications? data-* is only for within-site use?
#
Zegnat
It feels like what you really want is to really recommend people to add titles to their feeds, haha
#
Zegnat
Otherwise I think you are looking at defining a couple new + extending a couple of old rel values
#
GWG
Zegnat, that may be right
#
GWG
I do want to use home and feed to allow feed discovery though
#
Zegnat
According to the HTML standard it is fine to have a lot of rel-alternate + type <link> elements. They are “not necessarily syndicating exactly the same content as the current page”.
#
Zegnat
And then making clear which feed is the home feed by adding the home rel value makes sense to me
#
Zegnat
actually doesn’t like rel-tag because of its concept of a “tag space”
#
GWG
I am not going to do anything too fast though
#
GWG
Home likely yes
[Michael_Beckwit, [Lauro], KartikPrabhu, dougbeal|mb1 and [KevinMarks] joined the channel
#
[KevinMarks]
Well, for a classic site url which is mydomain.me/tag/indie that is a reasonable rel-tag url, but linking to it would imply tagging the homepage with that tag. If that page is a h-feed of posts with that tag, feed tag almost makes sense.
#
[KevinMarks]
If you're linking to it from a tagged post that's semantically OK.
#
GWG
[KevinMarks]: Marking up feeds is what I'm debating.
ChanServ, KartikPrabhu, mauz555, gRegorLove and [Michael_Beckwit joined the channel