Switching to WAI-ARIA
However, having researched ARIA a little for another book, (Responsive Web Design with HTML5 and CSS3 in case you are interested) it struck me that if this information has to go in the DOM purely for styling hooks, it may as well lift a little more weight while it's there.
These same styling hooks can actually be placed in the DOM as WAI-ARIA (https://www.w3.org/TR/wai-aria/) states. The States and Properties section of WAI-ARIA describes the W3C's standardised manner in which to communicate states and properties to assistive technology within an application. In the opening section of the abstract description for WAI-ARIA, it contains this:
These semantics are designed to allow an author to properly convey user interface behaviors (sic) and structural information to assistive technologies in document-level markup
While the specification is aimed at helping communicate state and properties to users with disability (via assistive technology) it serves the need...