7 ms·
You skipped "fuck semantic HTML and CSS, we use Tailwind now." <i> as italic was great like Tailwind is great: sometimes I just want to design something basic
by sph 4y ago
You skipped "fuck semantic HTML and CSS, we use Tailwind now."
<i> as italic was great like Tailwind is great: sometimes I just want to design something basic without having to context switch to CSS. I want italic, I use the <i> tag.
What has semantic HTML ever done for us? Does the browser care that I used <i> instead of <em> for italic? Do screen reader even care?
- renewiltord 4y agoI wonder if AI screen readers will ever use the visual appearance of something to determine what it means. So even if you draw on a `<canvas>` it can still read the text. That would be sick.
- z3c0 4y agoYou have a fantastic idea there, and if you'd like to attempt to make it a reality, I'm happy to brainstorm it with you. You keep full ownership of the concept; I'm happy to contribute given the people it'd help. You can contact me directly using my handle at my domain, which is 21337.tech
- renewiltord 4y agoz3c0, much appreciated, but I am prioritizing other things at this time. Let me hit you up at a future time if no one has already built something with this feature already!
- z3c0 4y agoFine by me! We'll table this for then.
- mywittyname 4y agoBetter to use a div instead.
- z3c0 4y agoMore than just a witty name, I see
- suby 4y agoI feel that this is where accessibility needs to go. We cannot rely on toolkits to implement support for accessibility standards because there will always be people building apps in niche toolkits / homemade gui's which don't support accessibility, especially as wasm becomes more common on the web. We need to treat the screen like a PNG which an AI can parse to determine what the text is, what text is relevant to read to the user, where and what the buttons are, how to emphasize reading the text based on the visuals, etc. It's the only thing that will scale and while difficult it seems that creating something like this is within reach.
- layer8 4y agoI agree in principle, but good luck with AI interpreting flat-UI controls visually, it’s confusing enough for sighted users. This actually gives me a little hope that AI-interpreted UI could trigger a trend back to visually obvious and unambiguous controls.
- madeofpalk 4y agoNo. That’s like saying OS should use AI to try and figure out what buttons are to make them clickable, rather that developers actually building an interface for users. All operating systems and platforms have pretty fluent and in-depth APIs for exposing an “accessibility tree” for assistive technologies to use. It’s your responsibility as a developer to build interfaces for actual users, and there’s very little reason not to.
- ronsor 4y ago> That’s like saying OS should use AI to try and figure out what buttons are to make them clickable, rather that developers actually building an interface for users. That's actually a really good idea.
- maxwelljoslyn 4y agoEspecially now that designers are making buttons/clickable areas hard to distinguish ... I could totally use AI to highlight all the things that are actually, you know, interactive.
- cxr 4y agohttps://hn.algolia.com/?query=donhopkins%20morgan%20dixon&sort=byPopularity&type=comment https://hn.algolia.com/?query=donhopkins%20morgan%20dixon&so...
- warpech 4y agoThis is fascinating. Do you know what ever happened to these projects? Prefab[1] and especially Bubble Cursor [2] look like be super useful additions for the flat-UI era. [1] http://prefab.github.io/ http://prefab.github.io/ [2] https://www.tovigrossman.com/BubbleCursor/ https://www.tovigrossman.com/BubbleCursor/
- rikroots 4y agoIn my view all canvas-related JS libraries should treat accessibility as a foundational requirement. It's not "too difficult" to implement. Here's an explanation of the accessibility features I've added to my canvas library[1]. These features may not be the best approach, or even the most appropriate approach ... but at least they're there, and they can evolve into something better as/when people offer feedback. [1] - https://scrawl-v8.rikweb.org.uk/learn/eleventh-lesson https://scrawl-v8.rikweb.org.uk/learn/eleventh-lesson
- aylmao 4y ago> What has semantic HTML ever done for us? For us small things, like enable reader views. For people with disabilities, it lets them effectively use screen readers.
- cratermoon 4y agoThe accessibility aspect is huge and deserves more attention and kudos than it gets. Also, from a purely selfish aspect, I vastly prefer documents with at least a minimum of semantic organization, even if it's just header, footer, main, and meaningful heading levels. Without those, well, it's just a document full of undifferentiated text with various attributes to distinguish it visually or typographically, and usually inconsistently used. Is this piece of text styled "bold with fontsize 16" supposed to be a second or 3rd level header?
- imgabe 4y agoWhat stops screen readers from treating the <i> tag the same way they treat the <em> tag? If <em> functionally ends up doing the same thing that <i> did, what's the point?
- reaperducer 4y ago<i> for things that should be italic for visual reasons. For example, the titles of books. <em> for things that are emphasized, as in emphatic expressions within text. For example "You'll get nothing and you'll like it."
- gnubison 4y ago*<cite>
- Tomte 4y ago<cite> is also pure joy. From MDN: > It's worth noting that the W3C specification says that a reference to a creative work, as included within a <cite> element, may include the name of the work's author. However, the WHATWG specification for <cite> says the opposite: that a person's name must never be included, under any circumstances.
- ramesh31 4y agoOnce upon a time, HTML was a document format, and there was a dream that these documents would be interconnected with deep meaningful semantics that would be machine readable. But then HTML became the rendering layer for a universal sandboxed VM, and all that went away.
- kazinator 4y ago> What has semantic HTML ever done for us? Why, it has liberated us from European colonialism. <i> being no longer italic, you can wrap it around any script from the world and enjoy the semantics of it.
- bioemerl 4y agoI'm confused, is this a joke? If it is, is there context here I'm missing?
- kazinator 4y agoFrom my end, it's intended that way, and I hope it is so.
- cercatrova 4y agoThe joke is that italic can also mean Italic, the ethnolonguistic group of those who spoke Italic languages and why Italy is named so. The phrase "What has semantic HTML ever done for us?" is a riff on the quote "What have the Romans ever done for us?" from the movie Life of Brian, about a Jewish-Roman man mistaken for another Messiah. The Romans are, of course, Italic peoples.
- kazinator 4y agoNo, that's not the joke, though for a brief split second, some moments after I wrote the comment, it occurred to me that the interpretation might arise. Italic type is derived from a form of semi-cursive writing, and is entrenched in the European printing tradition. No punning with Italy intended. So what does it mean if you have <i> around Chinese, or Devangari or what have you? Do you just apply shear to make the text slanted? I suspect that it bothered some "woke" types that HTML contains Euro-centric typographical directives, so they have been repurposed to have some sort of, culturally neutral semantics that is more inclusive of the planet's diversity (pardon me if I'm not nailing the terminology here). In short, <i> no longer belongs to whitey and his writing system.
- 4y ago
- notatoad 4y agoAh, I just decided to stop learning new things before tailwind came along
- krainboltgreene 4y ago> sometimes I just want to design something basic without having to context switch to CSS. I want italic, I use the <i> tag. Just use the <em> tag.
- marssaxman 4y agobut... what if the browser chooses to render emphasis in some fashion other than italic? How then could I force my design opinions on the reader, despite the contrary configuration of their user-agent? Surely we can't allow the end-user to control their experience when it's the designer's intention which really matters.
- klodolph 4y agoWhat if I want text that’s italic but not emphasized?
- a9h74j 4y agoYes, e.g. what if you are quoting something with italics in the original text? For older texts in English, italics might easily indicate a word or phrase in a non-English language. Showing that with semantic "emphasis" might convey the wrong impression -- e.g. without a note such as "emphasis added". The OP addresses "idiom in another language" as one case, but if it is within a scholarly quotation, can one change the typography to a different convention?
- paulmooreparks 4y agoThen there's the matter of languages such as Japanese that use a different set of characters (katakana) both to indicate emphasis and to mark foreign loan-words. Would katakana characters still be enclosed in an <i> element? Would styling be modified accordingly?
- naniwaduni 4y agoPerhaps you could add emphasis dots (https://en.wikipedia.org/wiki/Emphasis_mark https://en.wikipedia.org/wiki/Emphasis_mark)!
- dhc02 4y agoWait isn't Tailwind pushing the vast majority of its users to produce much more accessible websites than they would otherwise?
- eurasiantiger 4y agoIt’s just another Bootstrap.
- lewisflude 4y agoIt definitely looks like bootstrap in syntax. A lot of "css superfans" actually really enjoy tailwind in use. It solves more problems than it causes for some people.
- bananarchist 4y agoIt’s really convenient for prototyping but best to refactor to stylesheets before pushing all that bulk to production
- eurasiantiger 4y agoIt’s basically a return to the days of HTML without CSS. CSS classes are not applied as an abstraction of different visual styles or components, but purely as tools to define visuals in situ. I suppose it’s easier to reason about, but it feels like it was invented by that grug brain dude who likes solving lots of problems but hates thinking.
- dmitriid 4y ago> You skipped "fuck semantic HTML and CSS, we use Tailwind now." If look at Tailwind's website and examples, you'll see that it's one of the very few CSS frameworks that properly uses semantic HTML everywhere. And there's no such thing as "semantic CSS".
- sph 4y agoMost CSS best practices are based around semantic naming: you name your elements ".call_to_action" or ".sidebar". HTML5 introduced a lot of semantic elements such as <header> or <article>. Whereas with Tailwind or HTML < 5 you name you elements based on what they look like. ".font-bold" or "<b>"
- dmitriid 4y agoCSS purists will tell you that you shouldn't tie your CSS to specific structures in your code, and it should be as generic as possible :) > Whereas with Tailwind or HTML < 5 you name you elements based on what they look like. ".font-bold" or "<b>" No, you don't. With Tailwind you use the semantic elements in HTML. And you style them using generic primitives
- dimmke 4y agoSo with the @apply rule you can sketch things out in tailwind and put them behind semantic names if you have PostCSS running. It works quite nicely.
- xigoi 4y ago> And there's no such thing as "semantic CSS". I think the parent meant “[semantic HTML] and CSS”, not “semantic [HTML and CSS]”.
- vehemenz 4y agoThe screen reader cares about the big stuff, such as using headings, tables, and lists correctly. And of course, implementing ARIA attributes correctly. Other than that it doesn't matter too much.
- moritzwarhier 4y agoI find that Tailwind makes it a lot easier to use semantic HTML because it discourages element styling and provides an aggressive browser style reset. H2 or H3? A purely semantic distinction with Tailwind. Use an OL for a custom list of items? You start with a clean slate, no overrides required. And you are discouraged from writing custom CSS that causes unexpected styling as well. Every HTML tag with an empty class attribute is a clean slate. You only have to care about the default display mode and about allowed descendants.