The short answer is: no
For those of you that don’t know what W3C compliance means: nowadays it means that the HTML code sent to the browser is at least HTML 4.01 compliant, but in most cases it means that the code has to be XHTML 1.0 compliant.
This means that the browser is expecting the page to include some content and to follows some standards, like:
|Closing (non-)empty elements|
|Improperly nesting elements|
|Quotation marks around attribute values|
|XHTML elements and attributes are case sensitive|
|Using attribute minimization|
|CDATA: refer all script and stylesheet information in the head element.|
To simplify XHTML creation, there are 3 types of XHTML available:
- XHTML 1.0 Strict: “includes elements and attributes that have not been marked deprecated in the HTML 4.01 specification”
- XHTML 1.0 Transitional: “includes the presentational elements (such as center, font and strike) excluded from the strict version”
- XHTML 1.0 Frameset: “allows for the definition of frameset documents”
For every HTML page you should aim to be at least XHTML 1.0 Transitional compliance.
You might think: As long as the browser is showing the information correctly, why be W3C compliant? Once, you can put the W3C compliant image on your site: http://www.w3.org/QA/Tools/Icons. But more important is the fact that W3C compliant means that the same HTML code will get interpreted correctly by all relevant browsers (portability). Upgrading from Firefox 3.5 to 4.0 or from IE7 to IE9 won’t be such a high a risk anymore.
The W3C is offering a validator (http://validator.w3.org/) that check the HTML code of a site and gives you an error report. You can also use web developer plugins for Firefox to analyze the HTML code. I usually use Firebug and HTML validator.
Let’s analyze the portal. After an initial log in the user sees the typical default portal:
- Tool Area
- Top Level Navigation
- Detailed Navigation
- Content Area (empty)
The W3C Validator is giving me: Failed validation, 151 Errors
- Unable to Determine Parse Mode!
- No DOCTYPE found! Attempting validation with HTML 4.01 Transitiona
- Rare or unregistered character encoding detected (utf-8)
- no document type declaration
- Wrong usage of HTML:
- end tag for “XYZ” which is not finished.
- end tag for element “DIV” which is not open.
- document type does not allow element “TABLE” here; missing one of “TH”, “TD” start-tag
- there is no attribute “XYZ”
- Images: required attribute “ALT” not specified.
This goes on and on. Most part of this is caused by the iViews SAP is providing. So you can get rid of these error messages when you develop you own portal applications for TLN, Masthead, etc. Doing so, you will still get the basic HTML errors the portal is always producing. I’ve written a small example code:
|public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)|
This application only writes a standard portal page. Calling this application (http://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.example.default) gives me 3 errors:
- No DOCTYPE implementation
- Required attribute TYPE not specified:
- Required attribute TYPE not specified
As this is standard code, you’ll always end up in creating non-XHTML compliant code. Curious about this, I checked also the SCN and SAP.com page. I wanted to know if SAP is taking W3C compliance serious or not.
SCN (http://www.sdn.sap.com/irj/sdn): 201 Errors, 130 warning(s)
But at least they are providing the DOCTYPE: SAP.com (http://www.sap.com/usa/index.epx): 103 Errors, 4 warning(s)
- “there is not attribute: XYZ”
- “ID ‘img’ already defined”
- “element “H3″ undefined”
With the standard portal HTML code generation you won’t be able to have a W3C compliant portal. As the framework is already producing incompatible code, there is no easy workaround available.