Live data from Hacker News

Microformats Wiki

microformats.org

51–60 of 69 posts

Re: Microformats Wiki

#51
post #6

PSA: the best way to enable Microformat-like stuff with almost no effort is to keep describing content with reasonable class names even if you never pay any special attention to the microformats.org standards. One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written some…

I'd argue that using the `class` attribute for describing the content of a field is overloading it, and that it should only be used for linking to CSS styles. You're better off using another attribute, e.g. some data-* attribute, for semantic information.

> I'd argue that using the `class` attribute for describing the content of a field is overloading it

You, like several others commenters seem to have an internalized belief (probably based on assumption/association?)* that content class names are a contribution of the CSS spec. (This is the only way to interpret your "overloading" remark.)

Just because you can use the classes in your CSS as selectors doesn't mean that classes are just a CSS "thing" (or whatever) and that doing something else with them is "overloading" them. That's silly. The class attribute is for, like, you know, specifying the class of the content.

* (This raises the question: Is the word "class" just an opaque token to people? They've never typed out the sequence 'c', 'l', 'a', 's', 's', '=' and pondered it at all? Or do they, but it's limited to something akin to, "If you want to put a border or something then you put 'class' here on the element and then you can CSS it. I dunno why they called it that, but that's what you write, and it lets you do the border later." What do they think of the fact that you can also create CSS selectors based on element ID? Are element IDs, then, another just-a-CSS-thing in their minds? Or what about that you can make selectors using the element name itself? Or that class selectors are not the default—if you want to use a class-based selector in a style rule, you actually have to escape from the default mode by using a leading dot to specify that what follows should be interpreted as a class name? If classes were strictly within the purview of CSS, shouldn't the class selector be the default...?)

Re: Microformats Wiki

#52
post #47

Earlier quoted context omitted.

Aside from, uh, being affected by it? I don't know what "matters" means to you.

Matters how? Microdata seems irrelevant to begin with, ignored by search engines or anything else (at least in my limited tests), and faking it with semi-semantic class names alongside auto generated ones will do what, exactly? Like, what is this additional data layer actually for? What humans or software use it?

> Matters how?

I don't know. That's your word. You're the one who wrote it. I'm asking you.

> faking it with semi-semantic class names

Huh?

Re: Microformats Wiki

#53
post #6

PSA: the best way to enable Microformat-like stuff with almost no effort is to keep describing content with reasonable class names even if you never pay any special attention to the microformats.org standards. One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written some…

This is the first time I’ve heard of css classes used as a substitute for micro format data, do you have a reference for that? Also, from my understanding microformat really isn’t being used much anymore and the preferred method nowadays is json-ld.

Re: Microformats Wiki

#54
post #53
post #6

PSA: the best way to enable Microformat-like stuff with almost no effort is to keep describing content with reasonable class names even if you never pay any special attention to the microformats.org standards. One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written some…

This is the first time I’ve heard of css classes used as a substitute for micro format data, do you have a reference for that? Also, from my understanding microformat really isn’t being used much anymore and the preferred method nowadays is json-ld.

> css classes

There's no such thing. There are already detailed comments in this thread about this mixup.

Re: Microformats Wiki

#55

Earlier quoted context omitted.

> One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written something like class="video-thumbnail" and styled the content with a class selector in your CSS, but now you've adopted Tailwind and have excised all the descriptive class name from the content Are you really sug…

> Are you really suggesting that people should make Cascading Style Sheets do more than styling? The parent made no such suggestion. You seem to be conflating the purpose of HTML classes with CSS. Here's a note from the "literal entire spec"[0], which other commenters have already pointed out: > […] authors are encouraged to use values that describe the nature of the content, rather than values that describe the desi…

There is no evidence that eg Google uses arbitrary class names in order to index metadata over the accepted standards of microdata.

https://developers.google.com/search/docs/advanced/structure...

Re: Microformats Wiki

#56
post #45

Earlier quoted context omitted.

> One unfortunate side effect of things like Tailwind CSS is that some folks with a single-minded focus on looks are now using only the Tailwind class names, but you can do both. If before you'd have written something like class="video-thumbnail" and styled the content with a class selector in your CSS, but now you've adopted Tailwind and have excised all the descriptive class name from the content Are you really sug…

> Are you really suggesting that people should make Cascading Style Sheets do more than styling? No. I'm talking about the class attribute, not style sheets. The single-minded minded Web developers with a focus only on styling that I mentioned seem to have formed the belief that class names are just "a CSS thing" (or something)—and that's the problem. > At no point have users or maintainers of Tailwind tried to steer…

> The single-minded minded Web developers with a focus only on styling

Again with the attacks.

There is no evidence that eg Google uses arbitrary class names in order to index metadata over the accepted standards of microdata.

https://developers.google.com/search/docs/advanced/structure...

Given I know what microdata is, when to use it, and how it's different to CSS, I'm not sure what bubble this would be. Perhaps the one that is familiar with Google crawling?

Re: Microformats Wiki

#57

Earlier quoted context omitted.

What possible benefit can come from doing this, except to appease the standard writers? Describing the presentation of content is the sole purpose of CSS. I don't see why it should matter to anyone except the author herself what names are chosen for the presentation rules.

Accessibility for disabled users count?

User agents usually don't have general artificial intelligence and often can't infer content intent from class names. Accessibility doesn't magically improve just because of classes.

Accessibility help relies on using the correct, semantic tags, and when that is not possible, WAI-ARIA attribute hints.

Re: Microformats Wiki

#58
post #45

Earlier quoted context omitted.

> Are you really suggesting that people should make Cascading Style Sheets do more than styling? No. I'm talking about the class attribute, not style sheets. The single-minded minded Web developers with a focus only on styling that I mentioned seem to have formed the belief that class names are just "a CSS thing" (or something)—and that's the problem. > At no point have users or maintainers of Tailwind tried to steer…

> The single-minded minded Web developers with a focus only on styling Again with the attacks. There is no evidence that eg Google uses arbitrary class names in order to index metadata over the accepted standards of microdata. https://developers.google.com/search/docs/advanced/structure... Given I know what microdata is, when to use it, and how it's different to CSS, I'm not sure what bubble this would be. Perhaps th…

Where do you see an attack there...? That quote is a completely anodyne, factual description. There is zero pejorative (or even emotional content in it, for that matter).

> There is no evidence that eg Google uses arbitrary class names in order to[...]

Again: who are you arguing with? Every response you've written here has the quality of being written as if addressing someone or something that doesn't even appear in the discussion.

> I'm not sure what bubble this would be

The one that goes (roughly), "clearly I am addressing a fellow tradesperson who is biased against other factions, and therefore it is reasonable to declare this to be a thinly veiled attack that I have assumed it is". If you spend your time squabbling with colleagues (and/or trying to deflect attacks on Twitter[1]), and when you come across someone you immediately leap to the conclusion that they're working against you[1] on professional–ideological grounds, then there might be some bubble-backed paranoia at work.

I don't care about your opinionated in-trade squabbles. I don't occupy either "side" of the debate that you've tried to insert me into* any more than your aunts and uncles and grandparents do. (What are their thoughts on going with Tailwind versus not? I suppose they'll let you know when they get their first client for frontend work and it comes up—or even could come up—right? Me too. Until then...)

* and this is all not even to mention—as the other person who responded to you pointed out—that the position you attributed to me is completely opposite of what I actually wrote

1. https://news.ycombinator.com/item?id=22332525>

Re: Microformats Wiki

#59
post #40

Earlier quoted context omitted.

What possible benefit can come from doing this, except to appease the standard writers? Describing the presentation of content is the sole purpose of CSS. I don't see why it should matter to anyone except the author herself what names are chosen for the presentation rules.

Describing the presentation of content is the sole purpose of CSS. But describing the presentation of content isn't the sole purpose of the `class` attribute. Having meaningful domain-related names included in the class makes UI testing a lot easier.

As I said in my parent comment, there's other attributes better suited to purposes like this rather than overloading the `class` attribute.

You can, for example, use a `data-testid` attribute if the element can't be identified reliably with another attribute, such as the `id` or `role`.

Re: Microformats Wiki

#60

Earlier quoted context omitted.

What possible benefit can come from doing this, except to appease the standard writers? Describing the presentation of content is the sole purpose of CSS. I don't see why it should matter to anyone except the author herself what names are chosen for the presentation rules.

Accessibility for disabled users count?

No, you should be using ARIA attributes, such as `aria-role` for this where it cannot be inferred by the element's tag name.
Post reply on HN