Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same code does not report the same error (nav epub:type toc not mapped to ARIA role doc-toc) #338

Closed
editadapt opened this issue Jan 6, 2021 · 5 comments

Comments

@editadapt
Copy link

editadapt commented Jan 6, 2021

Using ACE GUI 1.1.2 on windows 10 I have this error reported:
Minor | Best Practice | epub-type-has-matching-roleVia: aXe | nav.xhtml#epubcfi(/4/2[toc])<nav xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" epub:type="toc" id="toc"> | Element has no ARIA role matching its epub:type Ensure the element has an ARIA role matching its epub:type ARIA role should be used in addition to epub:type

Strange behaviour because it does not happens on all epub checked. Here are two document code exemples, only document 2 triggers the error in ACE:

  • in document 1 i have no violation reported by ACE, code is:
 <nav epub:type="toc" id="toc">
      <h1 id="toc-title">Ariel</h1>
      <ol class="toc">
        <li id="toc-li-1">
  • in document 2 i have violation reported by ACE, code is:
<nav epub:type="toc" id="toc">
      <h1 id="toc-title">Índice</h1>
      <ol class="toc">
        <li id="toc-li-1">

Documents are copyrighted so i can't attach them here.

@clapierre
Copy link

looks like accented characters may be the issue here?

@editadapt
Copy link
Author

I can confirm the error was reported on two files wich both have accented character <h1 id="toc-title">Índice</h1>

But i believe the error should be reported on all files (with or without accented characters).

@danielweck
Copy link
Member

danielweck commented Jan 6, 2021

Ace App (aka "GUI") ships with Ace 1.2.x-beta, so the results should be equivalent when running Ace via the command line: npm install -g @daisy/ace@next (to install the Ace executable globally), or npx @daisy/ace@next /PATH/TO/BOOK.EPUB (to run it temporarily without installing it).

@danielweck
Copy link
Member

Could you please privately share the EPUB with me? ( [email protected] )
I'd like to understand the broader publication structure.

@danielweck
Copy link
Member

danielweck commented Apr 7, 2021

Hello, I am testing the latest build of Ace which has been significantly updated. I see that the Navigation Document of Ariel - José Enrique Rodo.epub has epub:type="toc" but no role="doc-toc". The reported error seems normal to me, if I interpret the specifications correctly (this is a "minor" ARIA best practice in the severity classification).
I see the exact same "error" in El yo y el ello – Sigmund Freud.epub, but there are also many more similar epub-type-has-matching-role errors in other XHTML publication documents (for example epub:type=noteref which should be accompanied with role=doc-noteref.
Specifications:
https://idpf.github.io/epub-guides/epub-aria-authoring/#sec-mappings
https://www.w3.org/TR/dpub-aam-1.0/#mapping_role_table
https://w3c.github.io/publ-cg/guides/aria-mapping.html#mapping-table

I am closing this issue as "fixed". Feel free to continue the discussion and / or re-open if you wish.

Ace "next" will be released shortly, I am running further tests at the moment.
See:
#314
and the DAISY fork of Axe here:
daisy/axe-core#4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants