Aleksej

Sections and Outlines in Pump.io

Aleksej at

What to do if you want to make a section with a header in your pump.io message? What to do if you want it to be comprehensible for something like screenreaders, or meaningful with CSS?

Dianara 1.2.3 has a "header" markup option, which makes the text a paragraph with lots of styling. That's not semantic (it's a WYSIWYG editor though).

In Pumpa, I made div elements. They even got proper xml:lang and lang attributes made out of the lazy "lang=en" I had added. Headers were h5, which I chose because message titles are h4 on my Timeline. The titles are h2 on the messages' pages though. That seems perfect, as long as message titles are not made h5 or deeper elsewhere. If they are, you'll get a font-size-related mess.

HTML5 proposes a solution: Sections and Outlines. I tried using the section tag in Pumpa, and it disappeared together with (xml:)lang; the paragraphs stayed there only thanks to Markdown. True, it is not really supported: section is something like div in Firefox 36 (this page indicates support since Firefox 4). The intent is, roughly, for a browser to consider any tags like h1-h6 inside a section a level deeper than those in the parent section (don't take my word for it if you are going to write anything).