emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* W3C violations in Org's HTML export
@ 2020-10-23 19:04 TEC
  2020-10-24 11:28 ` Bastien
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: TEC @ 2020-10-23 19:04 UTC (permalink / raw)
  To: org-mode-email

Hi everyone,

In developing my take on the Org website and my coFig file, it has 
to my attention that there seem to be a few W3C violations in the 

I always export with these settings,
which may affect some of the items below.
#+begin_src emacs-lisp
(setq org-html-doctype "html5"
      org-html-html5-fancy t)

* Error: Element p not allowed as child of element h2 in this 
  Org currently seems to put a p.subtitle inside the heading.
  This violates the "phrasing content" restriction.

** Suggestion
   Make the subtitle an independent element, is can still be a
   p.subtitle, just not /inside/ the h2 title

* Warning: The type attribute is unnecessary for JavaScript 
  This seems to be from the '<script type="text/javascript">' code
  highlighting script.

** Suggestion
   Remove the ' type="text/javascript"' part of that.

* Error: Attribute alt not allowed on element object at this 
  This occurs when one has an svg figure, and one wishes to add 
  alt text
  (good for accessibility). This is of course applied to the 
  What's interesting here is that the benefit of using an <object> 
  an <img> for SVGs seems to basically be that it allows for a 
  fallback (with the downside that it is downloaded even when not
  needed). However... if we're using HTML5, the <picture> element 
  for exactly this case, and provides a better implementation of
  fallbacks. Even if one is not using HTML5, I don't see any way 
  Org actually makes use of the potential for a raster fallback 
  raising the question of why an <object> is used over <img> in 
  first place. It appears that browser support for SVGs in <img> 
  was originally sketchy, however that issue seems to have bee 
  since resolved: https://caniuse.com/svg-img

** Suggestion
   Switch <object> to <img> for SVGs, if Org does add a mechanism 
   defining fallback images in the future, use <picture> with 

* Error: Duplicate ID org0424ed6.
  Clearly, this can happen. I'm not sure how.
  I'd like to draw attention to this email I sent a while ago 
  the mangled start)

* Error: Character reference expands to a control character 
  I have no idea where this is coming from, or why it's there --- 
  but it
  is, and it's not alone:
  + Error: Character reference expands to a control character 
  + Error: Character reference expands to a control character 
  + Error: Character reference expands to a control character 
  + Error: Character reference expands to a control character 
  + Warning: Document uses the Unicode Private Use Area(s), which 
    not be used in publicly exchanged documents. (Charmod C073)
  + Error: Character reference expands to a control character 

  I suspect this may be htmlize, but I'm not sure, and it's 
  so I'll include it.

* (not an error) Difficulty in 'wrapping' sections
  It's quite reasonable (IMO) to want to wrap a (sub*)section in a
  certain element, such as a link. Indeed I've wanted to do this 
  create clickable 'cards' on the homepage of my org website 
  Unfortunately there doesn't seem to be any property like 
  etc. that can be applied, forcing me to try this:

  #+begin_src org
  ,** Features
  @@html:<a href="features.html">@@

  Delve into the possibilities.

  This produces the following errors:
  + Error: End tag p seen, but there were open elements.
  + Error: Unclosed element a.
  + Error: End tag a violates nesting rules.
  + Fatal Error: Cannot recover after last error. Any further 
    will be ignored.

  It would be good to have a way to do this that doesn't cause W3C

That's all that I could see on a first glance. I'm hoping that
documenting these issues here will be the first step to solving 

To identify these issues, I applied https://validator.w3.org/ to
https://orgmode.tecosaur.com/ and 

All the best,


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-30 12:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-23 19:04 W3C violations in Org's HTML export TEC
2020-10-24 11:28 ` Bastien
2020-12-17 17:55 ` TEC
2020-12-20 17:11   ` Bastien
2021-04-30  8:27 ` Bastien
2021-04-30  8:57   ` Timothy
2021-04-30 11:37 ` Bruce D'Arcus

Code repositories for project(s) associated with this public inbox


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).