v0.13.4
Fixed
-
roleon<body>is checked against the four values epubcheck allows.
Doitsu, MobileRead 374286 #279:<body epub:type="cover" role="doc-cover">
drawsRSC-005from epubcheck and drew nothing from us. It does now, with
the same id at the same place.This is the only element whose
rolevalue is constrained, and that is
deliberate. epubcheck assemblesroleas a closed per-element enum across
the 1 739 lines ofmod/html5/aria.rnc; taking that whole surface means
risking a wrong error on someone's accessibility markup, which is a worse
thing to be wrong about than most.body.attrsinmod/html5/meta.rncis a
four-value enum that can be read rather than guessed, so this one site is
implemented and the rest stay value-permissive — the same partial shape as
RSC-020.Nothing changed on real books: of 474 shelf books, 52 use
roleat all and
exactly one puts it on<body>— and that one is EPUB 2, whereroleis
rejected outright already. The rule is held by its tests, not by the shelf. -
A
rolevalue must be one of the 111 names epubcheck's schema declares,
and<html>may not carryroleat all. Found while asking whether the
<body>fix above was enough: probed across 17 elements, epubcheck rejected
an invented role token on 16 of them and we accepted it on 15. It does not
any more.The vocabulary is extracted from
schema/30rather than transcribed — 111
names, 39 of them DPUB-ARIAdoc-*.roleis a single token in XHTML and
not a list: epubcheck rejectsrole="doc-noteref button", and so do we.The per-element layer is still not ours, deliberately. epubcheck also
restricts which of the 111 each element may carry, and that is the 1 739
lines this stays out of;<p role="doc-cover">is wrong there and accepted
here. The measurement is what made the split worth taking: the token layer
accounts for 15 of the 16 disagreements and the per-element sets are
otherwise broad, so the cheap half is nearly all of the value.Again no change on real books, and again checked rather than assumed: all 15
distinct role values across the shelf are valid names, and no book puts
roleon<html>.
Full notes: CHANGELOG.md. Also on crates.io.