lunartulip: (Default)

Dreamwidth cut tags are useful things for a variety of purposes. Content warnings, spoiler warnings (insofar as one considers those a distinct thing from content warnings), hiding long walls of text from people who don't specifically click into them, et cetera.

However, cut tags have three major downsides. First: they're JavaScript-dependent. Anyone who's locked down their browser's JavaScript functionality for security purposes will be unable to open or close them. Second: they're not usable in comments, only in entries, so anyone who wants to post a content-warning-warranting or spoiler-warning-warranting or long piece of content in a comment has no choice but to inflict said content on everyone. And third: they only appear in journal or reader view, not in directly-linked entries, so even top-level posts only get to point them at people reading said posts incidentally, not at anyone who's been specifically linked to the relevant posts.

As it happens, modern HTML has a solution to this set of problems: <details> and <summary> tags. These are supported in all modern browsers—according to Can I Use, approximately of 97% of browser-instances currently in use—and they work very similarly to cut tags, but in pure HTML, with no JavaScript required and no limit of being usable only in top-level posts viewed not-through-direct-links.

Side-by-side examples of the two, for purposes of comparison:

This is a cut tag. )

This is a details/summary tag-pair.

This is some text within the details tag.

The source code of those two examples is, respectively:

<p><cut text="This is a cut tag.">
<p>This is some text within the cut tag.</p>
</cut></p>

...and...

<details>
<summary>This is a details/summary tag-pair.</summary>
<p>This is some text within the details tag.</p>
</details>

(If you use the casual HTML editor rather than the raw HTML editor, then you can skip the <p> tags, of course. Although then you'll have a bunch of extra line breaks added in which you probably don't want, both for the cut tag and for the details/summary tag-pair.)

So. The basic pattern is: the <details> tag marks its contents as requiring a click-through to read, same as a cut tag. If it contains a <summary> tag, its preview text will be the contents of said <summary> tag. If not, then, much as a cut tag without a text attribute will default to preview text of "Read more...", so a <details> tag without a <summary> tag will default to preview text of "Details". Overall the syntax isn't substantially more complicated than that of cut tags, just different. And, in return, you get to avoid all three of the previously-mentioned downsides! For most people, I suspect that details/summary tag pairs are, in fact, going to be the more useful of the two most of the time.

(I don't know the relative demographics, among Dreamwidth users, of people who keep JavaScript disabled versus people who use ancient browsers which lack support for these tags. But I don't expect the two groups to be too different in size, so I wouldn't expect there to be a substantial hit in accessibility from using these tags, either.)

And there we have it. For anyone who was previously unaware of <details> and <summary> tags' existence, or of their usability on Dreamwidth, now you know! Hopefully the information is helpful.

lunartulip: (Default)
Despite plans to the contrary, my crossposting between dreamwidth and tumblr seems to mostly have stopped happening. It started because I got a couple tumblr asks to which I wrote effortpost-y answers, and asks as a format don't translate neatly into Dreamwidth; but now I just did a top-level post which I also don't feel like crossposting, so at this point I think I'm resigned to just no longer finding it worth the effort now that tumblr has somewhat stabilized. Sorry to anyone who'd been hoping to catch all my important content here in place of my tumblr. I may still crosspost here occasionally, but not with the consistency with which I'd previously planned to do so.
lunartulip: (Default)
I don't really understand the local norms with regard to giving people access to one's stuff.

Or, like... there are some use cases I understand. I could understand an arrangement like "this is basically a private blog, only those invited need get to see the posts here"; and, simplifying on that, I see the appeal of something like "instead of having a main blog and a private one, just post the same stuff in both but make the latter access-restricted and the former not". That makes sense to me, as a use case, and in that context one's access-grantings presumably depend on who it is that one wants to see whatever private content one is posting.

But, as someone with no particular use for a private blog (and, for that matter, very little urge towards privacy in general, outside of the "keep the confidences of people who care more than I do" case), I'm not quite sure what local norms dictate I should do with my access permissions. Do I give access to nobody, because doing so would be kind of useless? Do I give access to everybody, because there's no reason not to and it signals openness? I have No Idea.

Does anyone else have thoughts on how to handle this?

Profile

lunartulip: (Default)
Tulip

January 2023

S M T W T F S
1234567
89101112 1314
15161718192021
22232425262728
293031    

Syndicate

RSS Atom

Style Credit

Expand Cut Tags

No cut tags
Page generated May. 26th, 2025 05:00
Powered by Dreamwidth Studios