We could do this in exactly the same way as HTML validation and accessibility checking: Optionally run on every page load (or explicitly with an assertion call, which we have implemented under #166).
Note that this needs a bit more consideration than HTML validation and accessibility checking, see the comment here.
Jira issue