#microformats 2025-05-29

2025-05-29 UTC
gRegor, barnaby and strugee joined the channel
#
trwnh
this is the part that i'm unsure about -- aren't multiple rel values supposed to apply their semantics independently? what does "code" or "root" mean on its own? > I expect any user visible/clickable in-page links with rel=repository to have at least one other value, e.g. at most one of "code", "directory", or "root"
#
[tantek]
trwnh, not really. e.g. rel="alternate stylesheet"
#
[tantek]
root and home are used on their own currently on links to home pages
#
trwnh
that seems confusing and i'm not entirely sure why -- my intuition is strongly telling me that something like rel="alternate stylesheet" should be equivalent to rel=alternate + rel=stylesheet. i think it has to do with space-delimited values?
#
trwnh
i can tell that it isn't equivalent but that *bothers* me
#
trwnh
i don't know enough to say why though
#
[tantek]
there's no rule about rel values being independent, so they can be or can do things in combination, in some ways just as different attributes themselves can. like rel=alternate type=application/rss+xml etc.
#
trwnh
like "alternate" should be in relation to the current resource/document, not as a modifier for "stylesheet". i don't have a problem with rel+type because that feels fine, they're separate parameters intended to be interpreted together
#
[tantek]
example for "code" on its own mentioned previously, wikis that require login to edit, and otherwise display a "View Source" button/link that takes you to a source view
#
[tantek]
let me find the citation
#
trwnh
i guess discriminating on title= is also something that sometimes gets used for this? the problem is that title= is freeform arbitrary input that doesn't really have the expectation of being parsed for token usage
#
[tantek]
trwnh, it is reasonable to propose an alternative where all values are fully combined, e.g. rel="repository-code", "repository-directory", "repository-root" and treat them all as unique tokens
#
trwnh
that might be justified, yeah
#
[tantek]
to some extent we should explore such possibilities and evaluate them based on ease of publishing for developers and ease of consistent implementation by consuming applications to present consistent and predictable UX to users
#
[tantek]
there are pros/cons to decomposed separate values like "code", "repository", "directory", "root" that can then be used in combination and similarly pros/cons for fully composed values
gRegor joined the channel
#
trwnh
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/alternate_stylesheet seems to indicate that "alternate stylesheet" might have issues in browsers other than firefox?
#
[tantek]
my experience has been that simpler, more elemental values that make sense on their own and in combination work better, and scale better (extend better) than fully composed values
#
trwnh
i'm speaking more in a logical sense though, i would get tripped up if i saw something rel=alternate that wasn't actually an "alternate", it was a "stylesheet that shouldn't be applied by default"
#
trwnh
this screams historical reasons to me though
#
trwnh
yeah it's exclusively a firefox thing, no other browsers support "alternate stylesheet" like this
#
[tantek]
I mean many more used to, Opera, MacIE, possibly Edge?
#
trwnh
looks like chrome supported it but then chrome 48 removed it
#
[tantek]
weird bit of history, wonder what happened
#
trwnh
the MDN page calls out that you should use prefers-color-scheme and prefers-contrast where possible
#
trwnh
that doesn't seem to fully cover the use cases enabled by firefox's functionality, but it is admittedly quite niche in the first place
#
trwnh
iirc prefers-color-scheme is "light" or "dark" only
#
[tantek]
on that tangent there was a whole discussion in the W3C sustainability channel that there should also be an "eco-mode" alongside those two, to for example choose pure black pixels on OLED displays
#
trwnh
in any case, i would prefer link relations that are self-sufficient and composable rather than having weird dependencies on other rel values
#
trwnh
it makes parsing and behavioral logic way easier
#
[tantek]
pretty sure all the latest proposed ones are both self-sufficient and composable
#
trwnh
yeah to be clear repository-code repository-directory repository-root seem fine to me
#
[tantek]
but those are not composable, those are precomposed
#
[tantek]
"code" "repository" "directory" "root" have both solo uses and composed uses
#
trwnh
sorry, by composable i meant that you can use multiple rel values for the same href/target but the rel values should continue to apply independently
#
trwnh
i am not sure i fully grasp the use of "code" alone as opposed to "repository-code"
#
[tantek]
mediawikis are a good example of where you'd use rel="code" for the not logged in state on the "View Source" link, and in the logged in state rel="edit code" for the "Edit" link
#
[tantek]
no use of repository at all
#
[tantek]
this is why it makes sense to have them all as separate rel values, which both act independently and when used in combination, may provide additional functionality
#
trwnh
i would probably publish rel=repository-code for e.g. an "edit this page" link on the mastodon documentation that links back to github.com/mastodon/documentation/edit/... and similar use cases. this is what i was previously considering rel=edit for
#
[tantek]
again, syntactic differences aside, such multiple rel values are a similar mechanism as multiple attributes with their own values that mean their own things, and have special meanings in combination
#
trwnh
for clarity i'm trying to understand what rel=repository means, what rel=code means, separately
#
[tantek]
yup, already explained rel=code
#
trwnh
i can understand them together but not when they are "decomposed"
Saige_Leah joined the channel
#
[tantek]
go look at a mediawiki installation (besides Wikipedia) when not logged in and browse pages
#
[tantek]
e.g. W3C wiki, IndieWeb wiki, microformats wiki etc.
#
[tantek]
rel="repository" would be used for linking to resources in repositories where it's the literal file instead of 'code'. e.g. a plain text file
#
[tantek]
anyway all this is in the chat logs for this channel the past few days, take a look for more explorations and we'll eventually get this documented in an organized way on the wiki page
#
[tantek]
trwnh, since you mentioned mastodon usage and rel values, do you know if any progress has been made on implementing parsing of: link rel="author" type="application/activity+json" ?
#
trwnh
sadly i think no, the developer attention was swept up with quote posts for the past several months
#
trwnh
i do hope that at some point there is a profile for a subset of HTML, but this might take a long time
#
[tantek]
do you have ideas for how to get mastodon developer attention on re-using existing standards like link rel="author" type="application/activity+json" rather than what happened with the custom mastodon-specific markup?
#
trwnh
a few hours ago there was a discussion of rel=tag being used in mastodon to suppress link previews, but also class=hashtag i think does the same thing. things like this are scattered through the mastodon html parser and akkoma publishes class=quote-inline on their placeholders so mastodon will strip that i think
#
trwnh
i'd like to see standard markup being used but the ad-hoc continues to be used almost purely because of existing install base aka legacy reasons
#
trwnh
the meta name=fediverse:creator thing is unique in that i don't know why it was proposed like that, but it does mirror twitter:creator
#
trwnh
(for some reason the mastodon team pushed back on that assertion though?)
#
[tantek]
which itself was proprietary markup. so the methodology of propose something that mirrors something else proprietary is not a good design approach
#
trwnh
it's not a good design approach but unfortunately it is the prevailing one. proprietary or not, the methodology of fediverse development seems to be driven significantly by mirroring what came before
#
[tantek]
both things came before
#
[tantek]
it's just that one was proprietary (Twitter Cards) vs the other was standard (rel=author is years older than Twitter)
#
trwnh
the problem is that applications will publish things with... little regard for whether it is a good idea or not? it ends up being a temporary fix that develops into tech debt and somehow ossifies into an ad hoc standard
#
trwnh
well "before" also has a proximity component i suppose
#
[tantek]
in this case however, the standard alternative was proposed and discussed in the issue long before the proprietary version shipped, so there was no tech debt to justify it
#
trwnh
my understanding is that fediverse:creator was proposed by someone who used to work for twitter
#
trwnh
the tragedy here is that what gets proposed and discussed in issues is often swept aside by what catches the whims or interests or attention of the dev team
#
trwnh
i'm not sure what particularly leads to this kind of thing happening, but limited attention + shortcuts to bypass the noisy public process...
#
trwnh
it's a small team and it's a big community, and there isn't really a proper governance model yet (although ostensibly this has been in the works for some years now?)
#
trwnh
it's still a big shame that we lost mf2 support in the transition from 3.5 -> 4.0 because public pages started to be handled by the js frontend which didn't support mf2 (unlike the ruby haml pages which did support mf2)
#
[tantek]
ironically a bunch of the content is still there in meta tags so it's theoretically possible to mark those up with "metaformats" (microformats applied to meta tags)
#
trwnh
do you mean opengraph stuff? yeah, that's probably good enough for pulling a title and description, where "title" here means the author name, and "description" here means the content of the post. i guess you could map meta property=og:title to .p-author and also map meta property=og:description to .p-content
#
trwnh
that wouldn't be universal though, it would only work for mastodon-generated resources
#
[tantek]
hence mastodon should add the explicit class markup for microformats rather than parsers doing any mapping
#
trwnh
that would be the ideal, yes xD
#
trwnh
i think a good deal of this stuff would probably come up in discussions of a mastodon html profile, so it's not entirely off the table
#
trwnh
(i think...)
#
[tantek]
basically you would start with <head class="h-entry"> and go from there
#
[tantek]
<meta property="og:url" ...> would become <meta property="og:url" class="u-url" ...>
#
[tantek]
some are more obvious than others
#
[tantek]
there may be some interesting details to tweak for the nested author information
barnaby joined the channel