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

Add support for dpub-aria in HTML output #32

Open
link2xt opened this issue Dec 30, 2017 · 5 comments
Open

Add support for dpub-aria in HTML output #32

link2xt opened this issue Dec 30, 2017 · 5 comments

Comments

@link2xt
Copy link
Contributor

link2xt commented Dec 30, 2017

See jgm/pandoc#4213

There is no benefit yet, and Text::Amuse HTML output is not going to be processed by machine probably (there is a .muse source available, after all), but it might improve accessibility and help search engines index HTML output.

@melmothx
Copy link
Owner

Agreed, not a big deal and totally worth the effort.

@melmothx
Copy link
Owner

Actually, this is a no-go. Validation barfs everywhere.

https://validator.w3.org/
there is no attribute "role"

  <h2 id="toc2" role="doc-part">Prova 2</h2>

http://validator.idpf.org/

Error while parsing file 'attribute "role" not allowed here; expected attribute "class", "dir", "lang", "style", "title" or "xml:lang"'.

@link2xt
Copy link
Contributor Author

link2xt commented Dec 31, 2017

I think "role" should be attached to "section", "aside", "p" etc., something that actually holds contents, not h1, h2, ...

See https://stackoverflow.com/questions/4170356/what-values-can-the-html5-xhtml-role-attribute-have
Formal specification of HTML5 explicitly permits it: https://w3c.github.io/html/dom.html#wai-aria

@melmothx
Copy link
Owner

Well, the problem is that the HTML in the epub (version 2) is XHTML strict, not HTML5. Matter needs to be digged.

@melmothx
Copy link
Owner

melmothx commented Jan 1, 2018

as far as I can see, EPUB would need to migrate to 3.0 (with extra steps for backcompat) and HTML to HTML5.

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

2 participants