Matthew Graybosch
a cynical idealist, sf author, and full-stack developer

The <details> Element and Microsoft Browsers

I was trying to use the HTML5 <details> element to hide the majority of a blog post about bullying behind a trigger warning, but it didn’t immediately occur to me that I should see if IE and Edge actually support the <details> element.

Naturally, neither of Microsoft’s shitty browsers support <details>. Instead of hiding text contained within the <details> element until the user clicks on the summary, IE and Edge show both the summary and the contents.

As somebody on Mastodon pointed out, there’s apparently a way to work around the support gap in IE and Edge. But I’m not going to implement it on my personal website.

Let me show you why.

A photograph of the snow surface at Dome C Station, Antarctica, it is representative of the majority of the continent's surface. The photo was taken from the top of a tower, 32 m above the surface. Photo by Stephen Hudson
The field where I grow the fucks I give for IE and Edge users who aren't paying me. Photo by Stephen Hudson.

Now, in fairness to the IE and Edge development teams, the lynx doesn’t support the <details> element either. Nor is showing the text contained within <details> unreasonable; these browsers are simply ignoring elements they don’t implement, and that’s how HTML has worked since the beginning.

However, I’m going to piss on IE and Edge anyway because they’ve been the source of a great many headaches at my day job. I don’t have a problem with Lynx for the following reasons:

  1. The Lynx developers are up-front about their browser’s HTML5 support.
  2. Lynx is also a small open-source project.
  3. Lynx doesn’t come pre-installed as the default browser on an OS with majority market share.

Yes, I have a double-standard for corporations vs. people. I see nothing wrong with this because corporations are not people. They are granfalloons capable of incredible harm if not regularly subjected to a swift kick up the arse.

Now, as long as nobody at my day job reads this I’ll probably be fine. Remember: if most of your intended audience uses IE or Edge, think twice about using the <details> element unless you have an effective polyfill. And remember that this post is just my opinion, and not representative of my employers. :)


Thanks for reading. If you have any questions or constructive comments, please email me. I may reply directly to you, or if I think your message might be of interest to other readers I will answer with a new blog post.