Custom XHTML attributes cause W3C validation fail

12 years 1 month ago - 12 years 1 month ago #194264 by krileon

Richard67 wrote: HTML5 is not Joomla standard yet, or is it?
What I've seen is all templates wich I know produce XHTML 1.

Edit the index.php file and simply change it. XHTML1 is like 10 years old and isn't even maintained anymore. They've dropped all backwards support and focusing on HTML5/XHTML5 (they're basically the same now with HTML5). As far as I am aware our plans for CB 2.0 are to be completely HTML5 compliant. Joomla 2.5 uses HTML5.

From my point of view CB should generate valid markip according to the document type. Can't CB check the document type and integrate autocomplete only if HTML5?

That seams unnecessary for a single attribute. It won't break anything, but it simply won't pass the older W3C tests. If you want the badge then just W3C test for HTML5 and it should pass (set "Document Type" to HTML5 under "More Options", confirmed this passes for me in my tests).


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

12 years 1 month ago #194274 by Richard67

Edit the index.php file and simply change it.

Which one? The one in Joomla root does not set the document type, I think it is the template which does.

Joomla 2.5 uses HTML5.

Hmm, but why do I get XHTML 1.0?

If you want the badge then just W3C test for HTML5 and it should pass

Hmm, it does not. W3C markup validator complains about havinf found XMl at the very first line:

Line 1, Column 2: Saw <?. Probable cause: Attempt to use an XML processing instruction in HTML. (XML processing instructions are not supported in HTML.)

<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html><!-- <!DOCTYPE html PUBLIC…

Please Log in to join the conversation.

12 years 1 month ago #194280 by Richard67
Hi again, krileon,

I just see it is the template's index.php which does the doctype.

From the standard templates, beez5 has an option for either XHTML 1.0 transitional or HTML5, while beez20 has only XHTML 1.0 transitional.

I use a template called Allrounder, it includes this "<? xml" header line, while the beez templates don't.

I wil think over what I'll do, either remove this "<? xml" header line from the template's index.php or remove the autocomplete tag from the CB profile or do nothing.

Thanks for advice.

Best regards,

Richard

Please Log in to join the conversation.

12 years 1 month ago #194281 by krileon
You need to of course to have an HTML5 template. None of Joomlas defaults are HTML5. Many 3rd party have already begun releasing HTML5 templates. I believe several of their frameworks are also HTML5 ready (such as Gantry, but can't say for sure). Most are also already using CSS3 as well.

At any rate if you absolutely want autocomplete removed you can do so in CB 1.8 with the below lines.

administrator/components/com_comprofiler/plugin.class.php line 1585
administrator/components/com_comprofiler/view/view.user.php line 231
components/com_comprofiler/comprofiler.html.php line 342

If you want instead to validate against HTML5 simply change your doctype. Example as follows.

FROM:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
TO:
<!DOCTYPE html>

HTML5 isn't based on SGML so it doesn't need a DTD declaration making it pretty simple to set.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.
The following user(s) said Thank You: Richard67

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.208 seconds

Facebook Twitter LinkedIn