Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
Master
-
7.2.x, 7.1.x, 7.0.x
-
Committed
-
3
Description
OOTB Liferay violates WCAG 2.0 guidelines (specifically section 4.1.1 found here https://www.w3.org/TR/WCAG20/#ensure-compat)
- The DOM structure should be proper and not have any element between the <html> and <head> tags.
When inspecting the DOM in Liferay, a div element is found between the <html> and <head> tags, causing it to fail DOM validation.
Steps to Reproduce - AlloyUI.com
- Navigate to https://alloyui.com/
- Open the browser dev tools and inspect the elements
- Notice the following div between the Html and Head element:
<div id="yui3-css-stamp" style="position: absolute !important; visibility: hidden !important"></div>
- Notice the following div between the Html and Head element:
- In the developer console, prepare a copy of the loaded html and copy it to your clipboard, by running the following:
copy('<!doctype html>' + '\n' + document.documentElement.outerHTML) - Navigate to https://validator.w3.org/nu/
- Select Show source
- Select Check by text input
- Paste the copied loaded html into the text input field
- Click Check
Steps to Reproduce - Liferay
- Startup Liferay
- Follow steps above, but replace https://alloyui.com with http://localhost:8080
Expected Result:
Validator does not show the error:
Error: Element head is missing a required instance of child element title.
From line 2, column 99; to line 2, column 201
g="en-US"><div id="yui3-css-stamp" style="position: absolute !important; visibility: hidden !important" class=""></div>
Content model for element head:
- If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element.
- Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.
Actual Result:
Validator shows the error above
Additional Resources - Discussion regarding topic this in YUI3 repository
Attachments
Issue Links
- is related to
-
AUI-3187 YUI violates HTML specification with an improperly placed div element
-
- Closed
-