Skip to main content
Inspiring
November 18, 2022
Answered

2023 bug: ePUB export lang="en-US" added to paragraph and span tags

  • November 18, 2022
  • 6 replies
  • 3779 views

I have noticed since upgrading to inDesign 2023, that when I export an ePUB file, it's adding— lang="en-US" to ALL paragraph and span tags. The file will no longer validate, it comes up with thousands of errors. For example, all instances of paragraphs, headings, etc. have the language attribute applied: <p class="Content_initial-para" lang="en-US"> and when validating the file, the error comes up that that is not a valid attribute.

 

Anyone else had this issue? How do we fix it? There are no settings in the ePUB output to cause this, and it wasn't happening before I upgraded to 2023.

This topic has been closed for replies.
Correct answer James Gifford—NitroPress

I can vouch for the added tag (which I can't say whether I've seen before or not it's not in earlier exports I have on hand), but epubcheck shows no validation errors for it. As this is both the gold standard for validation and the core of many validators, I'm not sure why you're seeing an error.

 

ETA: Kindle Previewer, the other touchstone for real-world validation, doesn't mind or note the added tag.

 

Generally, superfluous tags in the code don't generate validation issues. EPUB code could be tripled in length by adding default, assumed or null tags and it shouldn't bother any validation process.

 

6 replies

Participating Frequently
February 13, 2023

I export to HTML, and having to go back to CC2022 to export so we don't get this language class added. It's truly a hassle for doing this. This language can be defined in the CSS style sheet and not have to be assigned to each paragraph and span. I wish Adobe will fix this. 

James Gifford—NitroPress
Legend
February 13, 2023

The fix with v18.1 was to correct some formatting error with the tag, not remove it. I don't know why Adobe added these redundant tags to every exported style; I have more or less confirmed it's not for standards compliance.

 

I haven't had any further problems and the EPUB exports validate fine, but would vote again for Adobe either reverting to  the prior practice, or making all these null tags switchable if they think there's some demand for them.

 

Participating Frequently
February 15, 2023

I appreciate the info James.

James Gifford—NitroPress
Legend
December 2, 2022

This appears to have been fixed in the current prerelease version. A prior request (with a murky title, which is why I didn't find it) was combined with mine, all discussion is here:

 

https://indesign.uservoice.com/forums/601180-adobe-indesign-bugs/suggestions/45879523-issues-with-epub-quality-on-the-new-2023-update

 

Inspiring
December 2, 2022

Thanks for this. FINALLY this issue is being addressed!

James Gifford—NitroPress
Legend
November 23, 2022

Over-reliance on EPUB validators is the source of more headaches in the EPUB workflow than they are worth, IMVHO. Much of what they check is arbitrary and has little to do with the "validity" of an ebook file.

 

If you insist on validating rigorously, it can be helpful to understand the technical structure well enough to be able to interpret and judge any reported errors. Otherwise, you can't tell a genuine problem (that will interfere with reading, accessibility, navigation, etc.) from a completely trivial (and IMHO, pointless and possibly wrong — there is nothing wrong with that language tag or its coding) "error" like this one.

 

Inspiring
November 23, 2022

Many of my clients use Smashwords, and they are VERY particular about the ePUB files. They will send the file back for very minor errors, so I always validate to avoid that. Even Amazon KDP and IngramSpark lately, are getting more finicky about error-free ePUBs.

James Gifford—NitroPress
Legend
November 23, 2022

Well, yes. Don't get me started. The EPUB world, supposedly driven by/to a single standard, is a swamp of players doggedly championing their own interpretation of what "standard" means. Let's not even go into how almost no two readers present a book (with or without flaws) the same way. Smashwords' choice is to be pointlessly rigorous about validation, using a particular tool and validation set, and rejecting completely normal variations. (As with all markup documents, there is no single, perfect code implementation; a single book could have several builds indistinguishable to reader apps and readers and all completely "validated.")

 

Things like this added lang tag are completely valid elements, but whoever wrote any one validator may have failed to accommodate them in the parsing functions.

 

ID rarely writes bad EPUB unless the document file has evident flaws, which can come from poor construction or sloppy work by the designer or from doc corruption. My touchstone is simple: If an EPUB displays and navigates correctly in Thorium, it's good. If an EPUB converts to Kindle without problems, it's good. And if a Kindle-from-EPUB displays and navigates correctly in Previewer, it's good... regardless of what any random "validator" shows. I haven't had a book rejected in a very long time by any service.

 

Which is why I don't bother with the seller sites that have their own arbitrary standards, just to reach a minor segment of the market.

 

And yeah, that's the short version. Sorry.

 

sarahkatreen
Participant
November 23, 2022

Teaberrycr - I wish I could take you out for a beer or glass of wine for this. I had the same error on a client's book and had no idea how to fix it. Yours is the first comment I found online that clarified what the issue truly was. THANK YOU SO MUCH!!!! I downloaded the earlier version of Indesign 17, opened my file, created the ebook and WOW! No errors. You made my week a thousand times easier. Thank you again!

James Gifford—NitroPress
Legend
November 18, 2022

I can vouch for the added tag (which I can't say whether I've seen before or not it's not in earlier exports I have on hand), but epubcheck shows no validation errors for it. As this is both the gold standard for validation and the core of many validators, I'm not sure why you're seeing an error.

 

ETA: Kindle Previewer, the other touchstone for real-world validation, doesn't mind or note the added tag.

 

Generally, superfluous tags in the code don't generate validation issues. EPUB code could be tripled in length by adding default, assumed or null tags and it shouldn't bother any validation process.

 

Inspiring
November 18, 2022

Thank you. I cannot get epubcheck to run on my computer. I use an online validator: https://www.ebookit.com/tools/bp/Bo/eBookIt/epub-validator

I've included a screenshot from epubcheck from W3c. It will not open.  😞

James Gifford—NitroPress
Legend
November 18, 2022

Yes, fun with MacOS's careful protections. 🙂

 

There are many validators out there and they vary as much as EPUB readers, all too often taking a core tool like epubcheck and adding features that put it in a UI wrapper, make it "easier to use" or interpret results in plain(er) English, or even add validation points not fully conforming to the EPUB standard. (I am in a state of perpetual face-palmed aghastness at the general state of the online ebook world, so this does not surprise me.) It's likely that that site is running an older/modified validator of some kind — especially as said ebook world never, ever updates anything or takes down obsolete material.

 

I'd "validate" your EPUB using another process — take that heads up that the one you are using may not be up to snuff — or figure out how to tell your Mac that epubcheck.jar comes in peace and means no harm. 🙂

 

That said, I don't know why Adobe decided to add this export detail. It may be ongoing effort to make the exports compliant with (updated) standards; I just got a notice that a long-standing flaw with end note exports has been fixed in the current pre-release version, so EPUB export seems to be getting some overdue attention.

 

Inspiring
November 18, 2022

Validation error says: Error while parsing file: value of attribute "lang" is invalid; must be an RFC 3066 language identifier