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

Variant of Basic Theme that is Valid HTML5 #1562

Closed
shimizukawa opened this issue Jan 3, 2015 · 9 comments
Closed

Variant of Basic Theme that is Valid HTML5 #1562

shimizukawa opened this issue Jan 3, 2015 · 9 comments
Assignees
Labels
builder:html type:enhancement enhance or introduce a new feature
Milestone

Comments

@shimizukawa
Copy link
Member

Would be nice to have html5validator without errors on themes inherited from basic (or an alternative to basic). The and elements are obsolete there.


@shimizukawa shimizukawa added type:enhancement enhance or introduce a new feature builder:html labels Jan 3, 2015
@shimizukawa
Copy link
Member Author

From Takayuki Shimizukawa on 2014-09-08 14:35:22+00:00

Thanks for a reporting.

These 2 changes will be released by sphinx-1.3.

However, I thinks some other html5 validation errors are exist because sphinx html writer is implemented based upon the docutils.writers.html4css1 writer.

@shimizukawa
Copy link
Member Author

From Sven Kreiss on 2014-10-24 14:47:33+00:00

Thanks for those fixes.

There are still many errors that html5validator returns. I am using sphinx==1.3b1 now:

> Almost standards mode doctype. Expected “<!DOCTYPE html>”
> error: The “frame” attribute on the “table” element is obsolete. Use CSS instead.
> error: The “rules” attribute on the “table” element is obsolete. Use CSS instead.
> error: The “valign” attribute on the “tbody” element is obsolete. Use CSS instead.
> error: The “frame” attribute on the “table” element is obsolete. Use CSS instead.
> error: Bad value “top” for attribute “rel” on element “link”: The string “top” is not a registered keyword.
> error: The “valign” attribute on the “td” element is obsolete. Use CSS instead.
> error: Element “dl” is missing a required instance of child element “dd”.
> error: The “valign” attribute on the “td” element is obsolete. Use CSS instead.

Also see, for example, this report: http://html5.validator.nu/?doc=http%3A%2F%2Fwww.svenkreiss.com%2Fdatabench%2Fv0.3%2Ffrontend.html

@shimizukawa shimizukawa self-assigned this Jan 4, 2015
@Suzumizaki
Copy link

Hmm, the issue like this already exists. You can try sphinx_html5_basic_theme. The package includes also html5_sphinxdoc theme, but need the patch #1885(see alse #1884).

@mgifford
Copy link

Surely though the default themes that come with Shinx should be valid html5 though, right? Isn't this issue mostly about cleaning up the defaults rather than alternative themes?

@tk0miya
Copy link
Member

tk0miya commented Mar 2, 2017

An experimental HTML5 writer is now introduced at #3464.
Thanks,

@tk0miya tk0miya closed this as completed Mar 2, 2017
@shibukawa
Copy link
Contributor

I tested, but there are three errors:

Warning: The document role is unnecessary for element body.
From line 36, column 3; to line 36, column 24
</head>↩  <body role="document">↩  ↩↩ 
Error: Start tag span seen in table.
From line 92, column 34; to line 93, column 22
 id="id1">↩<span id="test-table"></span
Fatal Error: Cannot recover after last error. Any further errors will be ignored.
From line 92, column 34; to line 93, column 22
 id="id1">↩<span id="test-table"></span
  1. Fix theme template
  2. Fix table caption with <caption> tag

@tk0miya
Copy link
Member

tk0miya commented Mar 2, 2017

Oh, I jumped to conclusions. Reopened.

@tk0miya tk0miya reopened this Mar 2, 2017
@tk0miya tk0miya added this to the 1.6 milestone Mar 2, 2017
@tk0miya
Copy link
Member

tk0miya commented Mar 3, 2017

Fixed at #3495. Thank you @shibukawa san!

@tk0miya tk0miya closed this as completed Mar 3, 2017
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
builder:html type:enhancement enhance or introduce a new feature
Projects
None yet
Development

No branches or pull requests

5 participants