IDPF / a11y-guidelines

EPUB 3 Accessibility Guidelines
7 stars 4 forks source link

Navigation TOC Example #3 #2

Open clapierre opened 8 years ago

clapierre commented 8 years ago

http://www.idpf.org/accessibility/guidelines/content/nav/toc.php Shouldn't there also be aria-hidden="true" here as well? `

  • A linked heading
  • `

    mattgarrish commented 8 years ago

    No, aria-hidden is redundant in this case. It applies to content that is still visible but is not relevant for AT to present anymore. The hidden attribute hides the content from everyone.

    clapierre commented 8 years ago

    Ok but in these two examples it has both the hidden and aria-hidden when is it needed? ' <div id="result" aria-live="assertive" aria-hidden="true" hidden="hidden"/> ' and ' function toggleExample(ex, show) { if (show) { ex.removeAttribute("hidden"); ex.setAttribute("aria-hidden", "false"); } else { ex.setAttribute("hidden", "hidden"); ex.setAttribute("aria-hidden", "true"); } ]]> '

    mattgarrish commented 8 years ago

    Should be stripped from those examples. Harmless but redundant. See this page: https://www.paciellogroup.com/blog/2012/05/html5-accessibility-chops-hidden-and-aria-hidden/

    It's actually less well supported than hidden, or was at the time that was written.

    I can't think of a good case of where you'd leave content visible in a publication but hide it from AT, but I'm not as imaginative as the people the ARIA folks are trying to account for.

    The alternative case I remember for the toc was that you could hide branches using hidden but make them available only to AT using aria-hidden=false. But this is also bad design, and there's no actual support for unhiding hidden content this way.