WordPress has a feature to enable HTML5 support which doesn’t cover all the places where HTML5 support is needed.

add_theme_support('html5', array(
  'search-form',
  'comment-form',
  'comment-list',
  'gallery',
  'caption',
));

This is everything available ^^^. When adding inline styles to the HTML, which WordPress does automatically, there is no filter hook available to remove the type attribute from the style tags. We end up with this incorrect output:

<style type="text/css">…</style>

Allowing this to stay there won’t break anything, it’s very insignificant overall. However, my practice includes the method of no broken windows. Allowing this to stay, though it’s really out of my hands unless I abandon WordPress entirely, is anathema to me.

It’s important to experience the pain of a program done wrong, before we can appreciate the well-made version of the same. There isn’t time to fix everything and still get the job done. Eventually it’s time to directly address the cause, but not today.

WordPress plugins, PHPUnit, WP_Mock and a few important principles by Erik Torsner (WordPress Essentials)
Some 4500 words after I decided to add a few comments and insights ... it’s a good idea to consider what happens when follow a handful rather simple and obvious rules of how to write code.
Erik Torsner articulates his authoring of a production-ready-but-not-really WordPress plugin which reproduces the output of Matt Mullenweg’s commonplace Hello Dolly, while demonstrating and justifying his practical choices in software construction and testing; a wonderful example for others to consider and leverage.
Semantic interoperability - Wikipedia (en.wikipedia.org)
… concerned not just with the packaging of data (syntax), but the simultaneous transmission of the meaning with the data (semantics).
When elements from independent systems of semantic interoperability appear within the same document, the semantic compatibility of the independent systems is the measure of their non-interference.

HTML and CSS have very good semantic compatibility, often appearing together in the same document.

This is on my mind lately as I consider the compatibility of web application sources with microformats, while building a utility to help identify any aspects of the web application sources which interfere with the desired interoperability embodied by microformats.

I currently describe my pre-release project as: “A utility which checks webapp sources for compatibility with microformats semantics”. Based on the foregoing, I’m considering changing the description a little. At the end of the day, the work is the program that helps find the issues in the code. I’m hopeful that someone with greater comfort discussing the topic will help me to gain some confidence in how I present the program. So long as it is providing some useful and desired outcome, I’ll be working on it for awhile longer. Hopefully work to benefit more than myself!

The working title of my project is Triage. Source code is available at the link. I posted to IndieWeb chat (#wordpress) awhile back that I would publish source as soon as it does something useful. I’ve got the core command-line utility there and it will identify semantics (and syntax) issues in CSS files. It will be a little while before I have a web-based interface to make this available to a wider audience. From there I’ll look to add other languages (HTML, PHP, JavaScript).

Preserve combinators that are not surrounded by white space by cjwillcock · Pull Request #14 · ThomasWeinert/PhpCss (GitHub)
I found with selectors that include a pseudo-class followed by a combinator (other than descendant combinator), with no space in between those two tokens,, such as "a:hover>span", the ...
One more little contribution to the useful PhpCss selector parser by Thomas Weinert. In this case, the regular expressions were greedily including combinators in pseudo-class literals, instead of seeing the end of the token.

Before: it saw a:hover>span and errored, saying “there is no such pseudo-class as :hover>span.”

After: it sees a:hover>span and putters along happily with element a, pseudo-class :hover, child combinator >, and element span.

Allow for pseudo-class position with repeat > 9n, no additional offset by cjwillcock · Pull Request #13 · ThomasWeinert/PhpCss (GitHub)
I found with selectors that include a pseudo-class with position, such as :nth-child(10n), the parser generates a token mismatch if the NUMBER is more than one digit. I traced this Scanner/Patterns...
I have found the PhpCss library from Thomas Weinert very useful. I used it so much, I found a bug and fixed it. It’s nice that this library has unit tests so I could quickly create a new pattern and expected output, then make my little correction.

Typical programming mistake, a missing plus (+)!