Fórum

Validating our HTML

thumbnail
Julio Camarero, modificado 14 Anos atrás.

Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
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!
thumbnail
Olaf Kock, modificado 14 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 6396 Data de Entrada: 23/09/08 Postagens Recentes
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)
thumbnail
Boubker TAGNAOUTI, modificado 14 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
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
thumbnail
Jorge Ferrer, modificado 14 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 2871 Data de Entrada: 31/08/06 Postagens Recentes
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.
thumbnail
Boubker TAGNAOUTI, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
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
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
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!
thumbnail
Boubker TAGNAOUTI, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
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 ;-)
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Validating our HTML

Junior Member Postagens: 33 Data de Entrada: 26/01/10 Postagens Recentes
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
thumbnail
Boubker TAGNAOUTI, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
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
thumbnail
Boubker TAGNAOUTI, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
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
thumbnail
Boubker TAGNAOUTI, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 140 Data de Entrada: 29/09/08 Postagens Recentes
Hi,

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

JIRA ticket : LPS-9770
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Validating our HTML

Junior Member Postagens: 33 Data de Entrada: 26/01/10 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Validating our HTML

Junior Member Postagens: 33 Data de Entrada: 26/01/10 Postagens Recentes
Hi,

I created tickets about the flags LPS-9974 and input_field LPS-9975 taglibs.
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
Thanks a lot Sebastien, both of them are committed now emoticon
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Validating our HTML

Regular Member Postagens: 162 Data de Entrada: 11/07/08 Postagens Recentes
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:
<!--================ Document Head =======================================-->
<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT" -->
<!--ENTITY % head.content "TITLE & BASE?"-->

<!--ELEMENT HEAD O O (%head.content;) +(%head.misc;) -- document head ---->
<!--ATTLIST HEAD
  %i18n;                               -- lang, dir --
  profile     %URI;          #IMPLIED  -- named dictionary of meta info --
  -->

<!-- The TITLE element is not considered part of the flow of text.
       It should be displayed, for example as the page header or
       window title. Exactly one title is required per document.
    -->
<!--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:
<!--================ Document Head =======================================-->

<!--ENTITY % head.misc "(script|style|meta|link|object)*"-->

<!-- content model is %head.misc; combined with a single
     title and an optional base element in any order -->

<!--ELEMENT head (%head.misc;,
     ((title, %head.misc;, (base, %head.misc;)?) |
      (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, modificado 13 Anos atrás.

RE: Validating our HTML

Junior Member Postagens: 33 Data de Entrada: 26/01/10 Postagens Recentes
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, modificado 13 Anos atrás.

RE: Validating our HTML

Junior Member Postagens: 33 Data de Entrada: 26/01/10 Postagens Recentes
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
thumbnail
Julio Camarero, modificado 13 Anos atrás.

RE: Validating our HTML

Liferay Legend Postagens: 1668 Data de Entrada: 15/07/08 Postagens Recentes
Thanks a lot for your answer Olivier!

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