The context of these suggestions is Notes Rich-Text in document, forms and pages. XPages are not considered in this text.
We need to be able to produce valid HTML5 with Domino Forms, Views, Pages and so on. Please make valid HTML5 a success criteria!
The default doctype should be changed to HTML5's <!DOCTYPE html>
, but still override-able in $$HTMLFrontMatter
.
Remove the language
and type
attributes, from the script
tag generated for form, subform and page JS headers. They are no longer required.
Given that CSS is responsible for the layout and look & feel, Domino must stop rendering HTML with presentational markup.
Drop the text
, bgcolor
, link
, alink
and vlink
attributes on the body
tag.
Drop the type
attribute on ul
and ol
tags, rendered from Notes Rich-text.
Mark up buttons as button
tags. No more <input type="submit">
nor <input type="button">
. This makes styling easier and makes semantic sense.
Remove table attributes: border="0" cellspacing="0" cellpadding="0"
, it is up to the application developer to make the CSS.
Leave empty table cells empty. No more <img width="1" height="1" src="/icons/ecblank.gif" border="0" alt="">
.
The hr
tag should no longer generate width
, size
and align
attributes. A simple <hr>
will do.
Indented RichText is rendered as a ul
tag, but without any li
tags inside, which is invalid. It would make more sense to mark it up with blockquote
tags.
This bug also exist inside nested lists, if the list items have a too big left margin.
All these changes will reduce the number of errors and warnings, when validating Dominos HTML output, on
W3C's HTML validator.
It saddens me to see this forum doesn't even have a web-server category, for suggestions.
More to clean up:
When inserting a picture in a rich-text field, the HTML generated has no
alt
attribute, if the alternate text field on picture properties is empty. But thealt
attribute is required in the HTML specs.If a link hotspot is created around a picture, and "Show border around hotspot" is not checked, then the picture inside the hotspot will render to an
img
tag with aborder="0"
, which is also obsolite.Another suggestion: Use
details
andsummary
tags for collapsible sections.See this Codepen for a demo.
True, these old-fashioned, early 2000's tags are often influencing coding.
However, as there are lots of old applications out there, that rely on these tags, I recommend a flag to enable or disable this behaviour ("use legacy tags", or so).
Great suggestion!!! That old fashion, 15 years old-style of HTML generation causes a lot of issues.
Awesome suggestions. I fully agree with all of them.
Theo