Skip to content

v0.13.4

Choose a tag to compare

@github-actions github-actions released this 06 Sep 22:21
· 3 commits to main since this release

Fixed

  • role on <body> is checked against the four values epubcheck allows.
    Doitsu, MobileRead 374286 #279: <body epub:type="cover" role="doc-cover">
    draws RSC-005 from epubcheck and drew nothing from us. It does now, with
    the same id at the same place.

    This is the only element whose role value is constrained, and that is
    deliberate.
    epubcheck assembles role as a closed per-element enum across
    the 1 739 lines of mod/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.attrs in mod/html5/meta.rnc is 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 role at all and
    exactly one puts it on <body> — and that one is EPUB 2, where role is
    rejected outright already. The rule is held by its tests, not by the shelf.

  • A role value must be one of the 111 names epubcheck's schema declares,
    and <html> may not carry role at 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/30 rather than transcribed — 111
    names, 39 of them DPUB-ARIA doc-*. role is a single token in XHTML and
    not a list: epubcheck rejects role="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
    role on <html>.

Full notes: CHANGELOG.md. Also on crates.io.