#dev 2024-10-01

2024-10-01 UTC
#
gRegor
Talked to them a bit in XOXO Slack, suggested they support mf2 since we have published examples of h-entry with p-category
#
[schmarty]
Those prefetch links are basically webmention notifications
#
gRegor
prefetch-mention! haha
#
gRegor
Yeah, discovery is what people get out of it. Think of it like indieweb dot xyz was, except it's aggregating hashtags via that prefetch instead of a webmention
AramZS joined the channel
#
[aciccarello]
Interesting use of prefetch. Seems like you'd get an excessive number of requests though since it's on every view
#
gRegor
They seemed open to the mf2 idea, though had to start somewhere. Interested to see how it goes.
#
gRegor
Yeah, tracking vector too
#
[aciccarello]
Their docs mention a open source codebase, but the link is broken https://octothorp.es/docs#hosting-a-community
#
[aciccarello]
Seems like the concept is a natural fit for the indieweb. I wish it would just use mf2 and webmentions though so I didn't have to change much.
#
[aciccarello]
Cause I'd consider having a link on one of my tag pages to a community's similarly tagged posts to view related conversations.
#
[Joe_Crawford]
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link indicates that for `as="fetch"` to work it requires a `crossorigin` attribute as well.
#
[tantek]
aciccarello, I tend to agree
#
[tantek]
and yes gRegor, tracking vector is a concern
#
[tantek]
ping on view is not a good model IMO
jeremycherfas joined the channel
#
Loqi
[preview] [nikolaswise] octothorpes: 'splorin octothorpin'
#
[aciccarello]
Yeah, maybe. The website does still have the sevelte favicon on it
#
[aciccarello]
I wonder how hard it would be to re-write it for mf2 and webmentions
#
[aciccarello]
I would guess it would mostly be changing the HTML parsing selectors
#
[aciccarello]
Could call it indiethorpes 😸
#
[aciccarello]
I don't think that project is the main api
#
gRegor
check if indieweb dot xyz was ever os
#
gRegor
*checks
onla joined the channel
#
gRegor
Doesn't look like it. Fraidycat is and there's a translations repo for indieweb.xyz, closest I could find
troojg, robertritz, onla, bterry, [aciccarello], [morganm], AramZS, ben__, jeremych-, [Murray], jacky, ttybitnik, to2ds, saptaks, gRegor, [tw2113], jjuran_ and spenc joined the channel
#
spenc
hi! working on a super basic blog post boilerplate (if a good example one exists, definitely lmk)
#
spenc
here's what I have so far (< 50 lines) https://paste.debian.net/1331024/
#
spenc
I'm a little iffy on using <h2> for the link to other blog posts (distinct from the link to the home page) and it also feels a little odd that the mess of things before the content in the article isnt hidden behind some sort of semantic tag, but I couldnt find one
#
[mattl]
The article should be above any tags IMO, also I think you should be able to replace any div tags with section, aside, etc
#
[mattl]
But this is a very good starter
#
[Murray]
@spenc overall looks solid, but there are a few HTML things that could be improved:
#
[Murray]
1. There should only be one `<h1>` on a page. I'd say as this is a blog article template, the most logical `<h1>` is the second one, the actual article title itself
#
[Murray]
2. That leaves the stuff in the `<header>` as needing a new element, though personally this reads like a navigation list, so a `<nav>` with two `<a>` elements seems fine, rather than the two `<hx>` options in use (it could have a `<ul>` in there, but with only two items I'd say that could be overkill)
#
[Murray]
3. This may be missing something, but you have a few blank `<a>` elements scattered throughout (i.e. without `href` attributes). In some places I can see why (e.g. tags) though might say add a blank href (`href=""`) is fine for a template, but others (e.g. around the date) I'm less certain on why they would be used/needed?
#
spenc
roger that- demoting the title to h2 & Blog link to h3 -
#
[Murray]
Love to see the use of `<time>` though, woefully underused 😄
#
spenc
yea! what a lovely tag
#
spenc
getting back into webdev after being out for a while, so many neat new ones now
#
[Murray]
Hmm, RE: demoting blog link to `<h3>`, I may be misreading that, but just make sure you retain a clear heading order. E.g. you have to go `<h1>` > `<h2>` > `<h3>` in the DOM order (I'm assuming here that "blog link" is the one in the header; if not, ignore me)
#
spenc
yeah does feel odd to not start with <h1>, thats why I had 2 originally
#
[Murray]
and yeah, lots of fun elements from HTML5, though a few which never really worked out 😅
#
spenc
from what I can tell, because its in <header> that makes it a distinct section, so the actual h-level doesnt reeeeally matter
#
[Murray]
RE: not starting with `<h1>`, I'm not sure you need headings at all in the `<header>` . If you consider the actual title of the page (what you might want to appear at the top in Reader Mode, for instance), you don't need the navigation elements at all. For a homepage, that pattern makes sense, beyond that it would be repetitive (each page has the same title, so not great)
#
[Murray]
And unfortunately, the whole "h-level resets in sections" part was recently removed from the HTML spec and was never implemented by any browsers. That's one of those HTML5 items that got away
#
[Murray]
From a heading order perspective, the whole page within `<body>` is counted as one "section"
#
spenc
oh! just went back to reread the header mdn, and it seems like you can put a header inside an <article> tag and have multiple in a page
#
[Murray]
Though note that this adds no real "semantic" information to the DOM itself; I still like doing that, personally, as it makes the code easier to read imo
#
[Murray]
But the only `<header>` element that gets genuine semantics exposed by default is the first one encountered within `<body>` (and, I think, cannot be nested within another semantic element? Need to check back on that 😄 Sectioning elements are a tricky bunch!)
#
spenc
ok cool, so the top header is a 'banner' because its directly under body, and will not have any <h>s at all
#
[Murray]
This is a really solid article on both the intended use of "landmark" elements within HTML today, as well as the current state of browser and assistive tech (AT) implementations: https://adrianroselli.com/2024/06/maybe-dont-name-that-landmark.html
#
[Murray]
(I disagree with Adrian's statement that "the following landmarks should only appear *once per page*" (emphasis mine), but the subsequent links on why they will work a bit differently than you might expect are worth keeping in mind 😉
#
spenc
reading that rn! thank you so much
#
[Murray]
no worries, always love things like this and have had to build quite a lot of these types of templates/POCs for work 😅 (though unfortunately never any with MF2 baked in!)
#
[Murray]
oh also, just seen your comments on `<hgroup>` in the main channel: basically don't worry about that element 😄 I love it, I even use it occasionally, but I've never found any combination of browsers/AT/OS that actually make it _do anything_. So use it for developer ergonomics if it makes sense, but don't worry about using it "right" (though what Mattl said is accurate for intended use case)
__DuBPiRaTe__ joined the channel