Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Julio Camarero
Validating our HTML
May 5, 2009 9:49 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Hi there,

as a first step to improve the accesibility of Liferay Portal we need to validate our HTML.
Although we are still considering changing our doctype (see this thread about changing to HTML 5) there are some things we can improve which are required both for xhtml or html validation. However, this list will be more specific once we define our doctype.

These are some of the things to improve that I have found at a first glance, but anybody can help to add new ones.
  • There can't be content after the </body> tag. (SOLVED LPS-3218)
  • URLs can't have illegal characters (for example: blanks) So, something like this: <a href="javascript: "> should be changed to <a href="javascript:"> (SOLVED LPS-3216)
  • Attribute name is no supported for inputs, forms... and instead we should use the attribute id (still optional in xhtml 1 and html 4 but mandatory in (x)html 5).
  • Attribute values must start with a character [A-Za-z], so values like _58_plid are no longer valid. This is something really important that we should consider, as it makes us modify all our namespaces.


Any help will be very appreciated!
Olaf Kock
RE: Validating our HTML
May 6, 2009 1:32 PM
Answer

Olaf Kock

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1581

Join Date: September 23, 2008

Recent Posts

You mean that bugs should be filed on topics that you named (or patches supplied)?

I can guess that it's hard to get a portal to produce valid xhtml, as this means that theme, layout template, all portlets (in the case of cms the web content articles) must produce valid output. At least it needs to be only "a certified subset", but I can guess that it'll be hard even if articles or other elements are piped through jtidy (this sometimes changes semantics - though most likely only on bad input).

In this light: Good luck. I'd like to see this, but this'll be hard work and require disciplin and work during deployment (e.g. in choosing only portlets, themes and other stuff that produces valid output)

Do you plan to tackle these problems with authoring-time jtidy, runtime-tidying or something else? (Just curious)
Boubker TAGNAOUTI
RE: Validating our HTML
February 3, 2010 1:36 AM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi Julio,

Did you choose HTML5 doctype definitively for the next release?
In this case, what is your progress on validating HTML code?

We are very interested about this work... maybe we can help to review portal's generated html code!

Regards,

Boubker TAGNAOUTI
Jorge Ferrer
RE: Validating our HTML
February 8, 2010 4:08 AM
Answer

Jorge Ferrer

LIFERAY STAFF

Rank: Liferay Legend

Posts: 2749

Join Date: August 31, 2006

Recent Posts

Hi Boubker,

Yes, we've decided to use the HTML5 doctype since it's the one that achieves the largest compatibility across existing browsers and portlets. Nevertheless we've also decided to use the XHTML syntax guidelines whenever possible.

The current trunk version validates except for a few errors in the new theme that we are working on fixing. We have only reviewed the most basic portlets for now though, but Julio, Sergio and Nate are very actively working on this along with trying to achieve WCAG 2.0 compliance.

We'd appreciate any help that you can provide on this task.
Boubker TAGNAOUTI
RE: Validating our HTML
April 17, 2010 4:37 PM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi Jorge and Julio,

As i promised we go started to work on our new website and i think that it will be the best occasion for us to take part in improvement of Liferay's accessibility effort!
Do you have any guideline or plan to synchronize our work?

Regards,

Boubker TAGNAOUTI
BEORN Technologies
Julio Camarero
RE: Validating our HTML
April 22, 2010 2:14 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Hi Boubker,

it is really great to hear these news from you!

Here you can find in JIRA our tickets created to achieve WCAG2.0 compliancei.

Most of them are already finished, but we are opening new ones as we find more accessibility problems. I think we have covered most of the basic accessibility problems in the portal, but I am sure we will be able to find a lot more.

It would be great if you could open a ticket in this section (as a subtask of the LPS-5891) for every problem you find or want to fix. Let us know if you just identified a problem or if you are also working on fixing it so that we can coordinate better.

Some of the tasks we have in mind now are:

  • Improve html validation. Now, the portal with the login portlet (alone) validates html5. We now want to start adding more portlets to pages and validate html with them.
  • we also wanted to start reviewing accessibility issues portlet by portlet. (The calendar is the first one in this list as you may see in the LPS above).


It would be awesome if you could help us creating new tickets for new problems that you find or even reviewing validation and accessibility portlet by portlet. We can coordinate through these forums or by email if you feel more confortable.

We have also started a wiki page to document all the things you can do to keep your portal accessible or that are related with accesibility somehow (Accessibility guidelines).

If you want to have a look at the latest improvements, you can have a quick look at the Episodes on liferay accessibility improvements in my blog.

Thanks a lot!
Boubker TAGNAOUTI
RE: Validating our HTML
April 23, 2010 9:37 AM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi Julio,

I've take a look at your blog posts and wow… you make a really good job on accessiblity improvement.

Our team will be pleased to take part on this work.
Because to find a suitable answer to problems related to accessibility is more difficult. I propose to validate, in a first step, HTML code conformance.

Our team could do this on this way :
- report issues related to html conformance (we can begin with Message board, blogs, recent bloggers, blog aggregator, web content display and asset publisher)
- propose bug fix for each tickets we have raised.

We could work, in a second step, on accessibility's issues.

PS : As i told Jorge on another post, we are also working for our contribution with display personalization portlet. It needs more work that we expect to transform our project's specific portlet to a generic one ;-)
Julio Camarero
RE: Validating our HTML
May 4, 2010 12:25 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Thanks a lot Boubker!

That will be an amazing help! Let us know about all the tickets that you open in this forum so that we can coordinate, I am looking forward to working with you.
Sébastien Meunier
RE: Validating our HTML
May 19, 2010 8:31 AM
Answer

Sébastien Meunier

Rank: Junior Member

Posts: 35

Join Date: January 26, 2010

Recent Posts

Hi,

Here is our first ticket about html5 validation: LPS-9724.
It's for the dockbar, since it's the only element that doesn't validate on an empty page for a logged user.

Sébastien Meunier
Beorn Technologies
Boubker TAGNAOUTI
RE: Validating our HTML
May 20, 2010 12:03 PM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi everyone,

I just added a new ticket LPS-9767 solving a minor issue (not escaped url) with a common themes file.

Boubker TAGNAOUTI
BEORN Technologies
Boubker TAGNAOUTI
RE: Validating our HTML
May 20, 2010 12:23 PM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi,

Another fix for url's escaping problem in the breadcrumb portlet.

Here is the ticket related to this : LPS-9768

Boubker TAGNAOUTI
BEORN Technologies
Boubker TAGNAOUTI
RE: Validating our HTML
May 20, 2010 1:38 PM
Answer

Boubker TAGNAOUTI

Rank: Regular Member

Posts: 142

Join Date: September 29, 2008

Recent Posts

Hi,

Another post to raise some html validation errors for input_editor taglib.

JIRA ticket : LPS-9770
Julio Camarero
RE: Validating our HTML
May 24, 2010 4:59 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Thanks a lot Sebastien and Boubker, I have committed your contributions.

I have a question for boubker regarding the ids starting with underscore, can you verify this?

Thanks a lot!
Sébastien Meunier
RE: Validating our HTML
May 28, 2010 8:50 AM
Answer

Sébastien Meunier

Rank: Junior Member

Posts: 35

Join Date: January 26, 2010

Recent Posts

Hi,

I added two tickets about validation errors I found in the theme and user_display taglib :
LPS-9933 and LPS-9935.
Sébastien Meunier
RE: Validating our HTML
May 31, 2010 6:30 AM
Answer

Sébastien Meunier

Rank: Junior Member

Posts: 35

Join Date: January 26, 2010

Recent Posts

Hi,

I created tickets about the flags LPS-9974 and input_field LPS-9975 taglibs.
Julio Camarero
RE: Validating our HTML
May 31, 2010 6:31 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Thanks a lot Sebastien, both of them are committed now emoticon
Julio Camarero
RE: Validating our HTML
June 1, 2010 2:36 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Hi Sebastian,

Brian stopped our changes to the <title> and <meta>. He told me that I should change that in many other places (I could do that, don't worry about it) but he also told me that HTML4 dtd says that title should go before meta. So, we should check this before making all the needed changes.

I have been doing some research about this and I found the following:

- In HTML4 the element title should go before meta
- In HTML5 there is no dtd, no order is stablished. Actually, in the example provided by the W3C, the meta-charset goes before the title. However, reading the specification, it says:
The charset attribute specifies the character encoding used by the document.
, which makes me think that it shouldn't matter if it is before or after the title, as it applies to the whole document. Maybe the validator is the one which is wrong not following this guideline. Which validator are you using? what do you think about this?

Thanks a lot!
Olivier Bonnet-Torrès
RE: Validating our HTML
June 8, 2010 12:17 PM
Answer

Olivier Bonnet-Torrès

Rank: Regular Member

Posts: 145

Join Date: July 11, 2008

Recent Posts

Hi Julio!
I am working at Beorn Tech with Sébastien and Boubker.
Here is our analysis of the topic:

- In HTML4, the dtd reads:
 1<!--================ Document Head =======================================-->
 2<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
 3<!ENTITY % head.content "TITLE & BASE?">
 4
 5<!ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head -->
 6<!ATTLIST HEAD
 7  %i18n;                               -- lang, dir --
 8  profile     %URI;          #IMPLIED  -- named dictionary of meta info --
 9  >
10
11<!-- The TITLE element is not considered part of the flow of text.
12       It should be displayed, for example as the page header or
13       window title. Exactly one title is required per document.
14    -->
15<!ELEMENT TITLE - - (#PCDATA) -(%head.misc;) -- document title -->

which in clear text means that title (compulsory) and base (optional) may appear in head element in any order, as well as %head.misc (optional), without any particular ordering (no comma specified). I am not sure any ordering constraint may be inferred from the expression. I could not find any convincing clue in the sgml definition itself as how to interpret collocated groups without ordering operator. Did I miss something?

- In xHTML1, the dtd reads:
 1<!--================ Document Head =======================================-->
 2
 3<!ENTITY % head.misc "(script|style|meta|link|object)*">
 4
 5<!-- content model is %head.misc; combined with a single
 6     title and an optional base element in any order -->
 7
 8<!ELEMENT head (%head.misc;,
 9     ((title, %head.misc;, (base, %head.misc;)?) |
10      (base, %head.misc;, (title, %head.misc;))))>

which explicitly authorises meta elements before and/or after the title (and forces the title element to be present).

- In (x)HTML5, the order is up to the author. Additionally the new charset attribute is introduced to the meta element as an alias to <meta http-equiv="content-type" content="text/html; XXX">: <meta charset="XXX">. Refering to http://www.w3.org/TR/html5/semantics.html#charset, declaring utf-8 or iso-8859-1 should do whether before or after title (because both are ASCII-compatible).

In conclusion it seems the validator is not up to date with the standard as you and Jorge hinted.
The validators in use at our facility are validator.nu and W3C validator.

Sébastien, could you please check if the same behaviour affects W3C's validator?

Olivier
Sébastien Meunier
RE: Validating our HTML
June 9, 2010 12:07 AM
Answer

Sébastien Meunier

Rank: Junior Member

Posts: 35

Join Date: January 26, 2010

Recent Posts

Both validators report the "error" when the file is sent by file upload, but report nothing when it is sent by text file / direct input. It looks like a bug...
Sébastien Meunier
RE: Validating our HTML
June 9, 2010 2:01 AM
Answer

Sébastien Meunier

Rank: Junior Member

Posts: 35

Join Date: January 26, 2010

Recent Posts

I completed the validation of message boards and related validation problems in the taglibs it uses :

LPS-10163 input_permission taglib
LPS-10164 search_iterator taglib
LPS-10165 aui input taglib
LPS-10166 message boards

There's also two tickets for which I do not have patches :
LPS-10167 language.properties files
LPS-10169 aui input taglib
Julio Camarero
RE: Validating our HTML
June 9, 2010 5:35 AM
Answer

Julio Camarero

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1622

Join Date: July 15, 2008

Recent Posts

Thanks a lot for your answer Olivier!

ok, so we will keep this as it is right now. Thanks so much! emoticon