Although it is possible for validators to check the initial state of an EPUB prior to its being loaded and consumed in a reading system, it is not so easy to determine whether scripted interactions will result in invalid markup being injected into a publication.
Developers should note that the
write method is not available in XHTML. New elements must
be created using DOM node functionality. The
innerHTML function for writing strings of
markup is similarly not available.
check if the content is valid at the point of insertion (or leaves valid markup after a deletion). A
simple typo, for example, might result in a table cell being added to a forced line break
br), instead of a table row (
While many developers only look at the visual result of their actions, consideration must be given to how an assistive technology will process such aberrations. In some cases the mistakes might be benign, but often they result in unexpected behaviors being triggered at unexpected times, and can limit, or take away, access to the content.