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

Possible wrong error with headings inside hgroup element? #391

Open
Changilainen opened this issue Sep 14, 2023 · 5 comments
Open

Possible wrong error with headings inside hgroup element? #391

Changilainen opened this issue Sep 14, 2023 · 5 comments

Comments

@Changilainen
Copy link

I have EPUB with hgroup elements. Here's one example of the hgroup element I have used in the EPUB:

<body>
  <div>
    <hgroup id="_idContainer005">
      <h1 id="_idParaDest-6" class="Otsikko1">1</h1>
      <p class="EiTOCOtsikko1-Alaots">Prologi</p>
    </hgroup>
    <h2 class="EiTOCOtsikko2">Kaarlo</h2>
    <p>...</p>
  </div>
</body>

The latest epubcheck 5.1.0 doesn't give any warnings or errors. If I validate the xhtml files with html validator, I don't receive any errors or warnings. But ACE report gives me these following errors you can see on the right side of the picture:
outlines-error

I'm not sure what the error "Error: no H1-H6 inside HGROUP" means in this case because there is one h1 element inside hgroup element.

Is there something wrong in my EPUB or is this false error from ACE? I'm using ACE 1.3.2 version on Windows 11.

@polypunkt
Copy link

I have the same problem, could you please explain the underlying check? Is it possible that the message is misleading, and the error is thrown if no

element is contained within

?

@danielweck
Copy link
Member

Ah, I think the solution is: #269

@danielweck
Copy link
Member

Also see #349 (comment)

@danielweck
Copy link
Member

could you please explain the underlying check?

The error message comes from a separate software package called h5o, which a future release of Ace will remove completely as the "HTML5 Outline Algorithm" is deemed unnecessary (doesn't map with actual real world usage of HTML heading / hierarchical sectioning, and interpretations from assistive technologies):
https://github.com/h5o/h5o-js/blob/821d9a379e8ad0f87a638eadc376ab489736f394/src/asHTML.js#L11

@polypunkt
Copy link

Thanks a lot.

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