January 23, 2020 Digital Hub Update

By Scribe Inc.

Published

Digital Hub Accessibility Updates

The Digital Hub has been updated to improve the accessibility of e-books produced by the Hub. To those ends, Hub conversions from ScML to ePub 3 and HTML will produce HTML that differs from past output in a number of ways. Users relying on customized CSS files should insert the following into their files to prevent the new HTML from showing horizontal rule elements added for accessibility reasons. Scribe’s default CSS has already been updated to include the line.

hr.sec-break {width: 0;}

HTML Structure Improvements

  • Conversion to ePub 3 will now add <section> elements around subparts of a chapter as delineated by heads (ah, bh, ch, etc.).
  • Chapter head styles will be combined inside <header> elements. These will have IDs.
  • Chapter <section> elements will point to the new header IDs using the “aria-labelledby” attribute.

Further info on heading accessibility recommendations can be found at DAISY’s Accessible Publishing Knowledge Base.

HTML Tag Changes

  • HTML <hr class="sec-break"/> elements will be inserted before psec, psec1, and sec. These should typically be styled so that they are hidden in most e-books. (See Context Breaks.)
  • ScML page elements will end up as <span> elements in the HTML instead of <a> anchors as they previously have. (See Page Navigation.)

ARIA Roles

ARIA roles are used to aid assistive technologies and to alert such technologies to the kind of content a user can expect to encounter. The Hub will apply ARIA roles automatically based on a number of different factors:

  • Several ScML styles and block elements will be mapped to a specific ARIA role in ePub 3 files. Examples:
    • Block elements
      • <div role="doc-epigraph" class="epigraph">
      • <div role="doc-pullquote" class="pullquote">
      • <div role="doc-footnote" class="footnote">
      • <div role="doc-endnote" class="endnote">
    • Paragraph styles
      • <h1 role="doc-subtitle" class="cs">
      • <h1 role="doc-subtitle" class="ps">
      • <h1 role="doc-subtitle" class="us">
    • Character styles
      • <span role="doc-glossref" class="gtref">
      • <a role="doc-noteref" class="fnref">
      • <a role="doc-noteref" class="enref">
    • Backlinked note num styles:
      • <a id="fn1" role="doc-backlink" class="fnnum" href="scr-accessibilitytests-0010.xhtml#fn1r">1</a>
  • Many chapters will be mapped to a specific ARIA role in ePub 3 files based on the chapter ID. Examples:
    • <section id="toc" class="chapter" aria-labelledby="headertoc01" epub:type="toc" role="doc-toc">
    • <section id="pt01" class="chapter" aria-labelledby="headerpt0101" epub:type="chapter" role="doc-part">
    • <section id="acknow" class="chapter" aria-labelledby="headeracknow01" epub:type="acknowledgments" role="doc-acknowledgments">
    • <section id="index" class="chapter" aria-labelledby="headerindex01" epub:type="index" role="doc-index">
  • A chapter containing endnotes in it will be given the “doc-endnotes” role.
  • The <img> element in the cover chapter (<chapter id=”cvi”>) will be given the “doc-cover” role.
  • The pagelist in the ncx will be given the “doc-pagelist” role.

More about ARIA roles and accessibility can be found at DAISY’s Accessible Publishing Knowledge Base.

Better HTML Titles in ePub 3

Where possible, HTML files within an ePub will have a different <title> element that more closely matches the content located in the file.

  • If the chapter is linked to by the TOC, the title will match the rendering in the TOC.
  • If the chapter ID is “cip” or “dedication,” the title will be hardcoded as Copyright Page or Dedication, respectively.
  • If the TOC chapter has a ctfm or ct, the title will be pulled from that text.
  • If the series chapter has a ctfm or sert, the title will be pulled from that text.

Otherwise, the HTML title will match the project title, as it has in the past.

More about recommendations for using the <title> element can be found at DAISY’s Accessible Publishing Knowledge Base.

Other Hub Updates

Hub project files will display in alphanumeric order; when files are merged, such as during .sam to .scml conversions, they will merge in alphanumeric order. If files have been numbered, use leading zeroes to ensure they sort and merge in the intended order.

Bug Fixes

  • Fixed issue that dropped links when round-tripping certain url styles back to Word.
  • Fixed ellipsis standardizer issue that caused spaces between character styles to be dropped in rare cases.