#dev 2024-10-02

2024-10-02 UTC
spenc joined the channel
#
spenc
should the site's name and link be in its own h-card?
#
[snarfed]
h-cards are generally for people and organizations and maybe apps/services, not sites per se
#
[snarfed]
(obviously the distinctions are fuzzy)
troojg and lifeofpablo joined the channel
#
_pi_r2_0[d]
[Murray]: Any practical evidence that multiple h1s are bad? They make sense to me (I don't want different heading levels for the same content between /posts and /news on my blog for example) and I figure we already have a unique title in the header.
#
[tantek]
I don't know of any. I think it's mostly a personal markup preference. I believe even screenreaders handle one or multiple h1s ok. However MDN says to avoid multiple h1s: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/Heading_Elements#avoid_using_multiple_h1_elements_on_one_page
spenc joined the channel
#
spenc
css grid is so neat omg
jjuran_, sp1ff and [qubyte] joined the channel
#
[Murray]
@pi_rd_0[d] yep, there are some. Reader modes are an example, where they will often use the `<h1>` on a page as the title and highlight that at the top. Additional top-level headings can be ignored (assumed to not be part of the relevant content) or demoted. I think if you have only one `<h1>` within a `<main>` then that _should_ get prioritised, but from experience there are a lot of different web page parsers and few agree on how to handle
#
[Murray]
them (voice assistants, feed readers, aggregators all fall into this category)
#
_pi_r2_0[d]
If you have examples of poorly behaved one I'd be curious to try
#
[Murray]
Plenty of people also use a page's heading order to navigate directly e.g. with screenreaders or voice controls, where there is often a key binding for jumping between headings. These assume a strict hierarchy to make it quick to scan over a page, and the expectations are that the `<h1>` would be the genuine page title. I believe some Braille converters also generate contents tables for a similar advantage, which will again assume one h1
#
[Murray]
Finally, I've been led to believe that this does impact SEO, though not sure on how up to date that is
#
[Murray]
The semantics are also clearest imo if you only have one page title. I'm not sure what scenario you would want multiple ones, but that feels like an information architecture issue to me
#
_pi_r2_0[d]
Again I already have one page title, it's called title not h1
#
_pi_r2_0[d]
My pages have sections and each of them have a hierarchy of headings
#
[Murray]
Title is practically metadata. I'm talking about the article title, the thing that you want a user to identify the page as, the thing they can see. They can be the same thing and sometimes you don't need a bespoke page title (e.g. commonly homepage) but outside of web apps, I've never seen a lot of places where that pattern is better than just having a proper title
#
[Murray]
Right, and there's nothing wrong with sections having hierarchies πŸ™‚ That's the ideal outcome! But they should probably all be `<h2>` elements as the section heading, and all be sat under the page title itself. If you have an example where that isn't the case, I'd be interested to see it
#
_pi_r2_0[d]
Each article is its own document, I don't shift the headings down
#
_pi_r2_0[d]
Would love to see what that breaks in readers concretely
#
[Murray]
Oh that's cool! So I'd say that the clear page title here is "Nothing Daily"; the purpose of this page is a collection of articles under a common headline (and that is it). Each article is then an `<h2>` under that common heading. That's just the common advice of course πŸ™‚ I'll give this a go in a couple of things and see what happens
#
[Murray]
But if I was doing an IA audit of this page, that would be my professional advice
#
_pi_r2_0[d]
Safari's reader mode understands the hierarchy.
#
[Murray]
As does Firefox, and from what I can so too does NVDA on Windows 10 (typical caveat: I am not a screenreader user so may have missed some nuance on that one)
#
_pi_r2_0[d]
(it's not a particularly interesting case because people can click on the 2nd link on the page to go back to a normal navigation between list of articles and individual page per article)
#
[Murray]
I will say that the "estimated contents table" looks like this, which most users would probably be fine with, though it still feels weird to me (personally) to have the first h1 at the same level as the others:
#
[Murray]
I don't have an Alexa or similar device on hand to quickly check that page algorithm, but yeah, it doesn't seem to be breaking much of anything at all that I can see πŸ™‚
#
[Murray]
I also wonder if having the first `<h1>` in a `<header>` outside of `<main>` is helping in that regard, which would match how I would implement a parser at least πŸ˜‰
#
[Murray]
I've tried digging through my own notes and references, and all I'm finding is lots of people saying "multiple `<h1>` elements is bad for SEO and bad for accessibility", but I must admit, I'm not finding any concrete examples of _why_ that is
__DuBPiRaTe__, E_Bomb and ttybitnik joined the channel
#
[Murray]
@pi_r2_0 do you mind if I share that news page on a few sites/channels as an example. You've nerd sniped me here and now I want some more concrete examples or understanding of this πŸ˜„
[KevinMarks] joined the channel
#
_pi_r2_0[d]
Sure, help yourself
#
_pi_r2_0[d]
It was already shared by 11ty on mastodon, most of my visits are to that page πŸ™‚
Guest6, AramZS, Xe and [tantek]1 joined the channel
#
[mattl]
Thinking about the way to support indieauth on http://Libre.fm where usernames for clients are the biggest concern. Either way I'm going to have to create a second username/password for a client.
[Murray] joined the channel
#
[tantek]
today's Weird Web October theme is CSS, in case anyone here wants to participate! https://weirdweboctober.website/
#
[tantek]
tempted to suggest a PR to use rel=tag in addition to the octothorpes markup, as it should be simpler / more minimal, except wondering what destination to link it to (which people would expect to see an up-to-date aggregation). [KevinMarks] may have ideas
#
[tantek]
also the octothorpes markup provided has improper use of the 'href' attribute
#
[tantek]
also curious what people consider to "make a website", like can a single page at a path on your existing website itself be "a website"? does it have to be on its own domain? can it be on a subdomain?
#
[mattl]
a single page can be a website IMO.
#
[mattl]
[tantek] what do you think of this Re: indieauth for http://Libre.fm? https://bored.city/demo.html
#
[tantek]
I don't understand what it is doing or what problem it is solving?
#
[tantek]
feels odd to pick an (*) IndieAuth radio button without providing (or at least displaying) the IndieAuth URL that will be used
#
[mattl]
so the bigger issue with indieauth for http://Libre.fm is being able to send data from your desktop music app to the server, right now there's one username/password per user and this is less than desirable.
#
[mattl]
tantek: also there should be an http://example.com box that appears when you pick indieauth
#
[tantek]
huh I didn't see it before but now toggling back and forth it shows up
#
[tantek]
also there's a state bug
#
[tantek]
click the IndieAuth radio button then reload in Firefox
#
[tantek]
the button remains clicked, however it now says librefm username instead of IndieAuth domain
#
[mattl]
oh i won't be writing this for real in javascript because as you can see, I don't know what I'm doing.
#
[tantek]
yes yes I would suggested checking out the :checked CSS pseudo-class and using that to hide/show subsequent relevant fields/labels
#
[tantek]
no JS needed πŸ˜„
#
[mattl]
well i need JS to generate a password.
#
[tantek]
something computational you could write in CASSIS instead and fallback to server-side business logic?
#
[mattl]
this is just a demo.
#
[mattl]
the eventual thing will be 100% server side, probably Rails
#
_pi_r2_0[d]
client-side cryptography -> need JS
#
_pi_r2_0[d]
most of my recent projects have involved client side crypto…
#
sebbu
i need to reproduce some client-side cryptography for a project :(
#
sebbu
like, the website uses encryption for public unauthentificated stuff
#
sebbu
"why?"
#
sebbu
(i wanted to retrieve the website data from PHP)
#
sebbu
(I did it, until they added crypto)
#
sebbu
I'm a few hundred chapters late now, i should resume reading it
#
sebbu
difficulties : site uses wasm, android app uses .so native code
__DuBPiRaTe__ and gRegor joined the channel
#
gRegor
I'm also reading "a website" as "a page" for WWO. Other examples I've seen followed that too. One was even a codepen.
#
gRegor
Poking around, octothorpes has pages like https://octothorp.es/~/weirdweboctober
#
gRegor
So could suggest they parse pages for rel-tag, but they'd need to switch to a ping/webmention setup instead of GET requests
#
gRegor
Aside, looks like Mastodon a lot "weirder" than Bsky. My post is the only one on Bsky tagged #weirdweboctober
#
gRegor
Oh hey:
#
gRegor
`GET https://octothorp.es/index?uri=<uri>` Submits a given uri for indexing on the Ring.
#
gRegor
Still need to have your site registered first, I think
#
trwnh
are there any definitive takes on when to use u-photo vs u-logo for an h-card
#
trwnh
like in as2 vocab, there's "icon" for 1:1 avatar-style images, and "image" is generally unconstrained (often used as profile banner in the Mastodon protocol). am i correct in assuming that u-logo = as:icon, or is it more like u-photo should be used for people and u-logo for businesses?
#
[tantek]
I think that sounds right. There's a page on the W3C Social Web wiki that I think connects mf2 - as: equivalences
#
trwnh
the thing that gives me pause is that afaik h-card is inspired by hcard which is inspired by VCard, and in vcard the LOGO property is described as "To specify a graphic image of a logo associated with the object the vCard represents." and PHOTO is described as "To specify an image or photograph information that annotates some aspect of the object the vCard represents."
#
[snarfed]
also, tons of software consumes u-photo, but afaik very little consumes u-logo
#
trwnh
and from what i can find about vcard online it seems that most contact apps use PHOTO although some use LOGO so i saw some recs to use both but put the same image in both
#
trwnh
ah unclear semantics, bane of my existence
#
gRegor
Yeah, I've published u-logo in an org's h-card, but don't know of anything consuming it
#
[snarfed]
btw vcard is mf1-related, and h-card is mf2. not a lot of overlap in consuming software
#
[tantek]
sort of. mf2 still derives its semantics from vcard
#
[tantek]
I should draw a flow chart πŸ˜‚
#
Loqi
definitely
[schmarty] joined the channel
#
[mattl]
[tantek] did you just volunteer to make UML?
#
[tantek]
[mattl] my "draw a flow chart" routine these days is Apple Pencil + iPad
#
[mattl]
Oh good
#
[tantek]
maybe someone has a way to use GenAI to take that and turn it into ASCII art flow chart (I know there a non-AI tools that take ASCII art flow charts and turn them into reasonably high quality SVG, the IETF is using some for some diagrams in their specs)
alephalpha0, ttybitnik, troojg, pyzn and bterry joined the channel
#
[mattl]
rel="me nofollow" is fine, right?
#
[mattl]
nice. http://Libre.fm profiles now support rel="me"