Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-107529

YUI violates HTML specification with an improperly placed div element

    Details

      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

      1. Navigate to https://alloyui.com/
      2. 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>
      3. 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)
      4. Navigate to https://validator.w3.org/nu/
        1. Select Show source
        2. Select Check by text input
      5. Paste the copied loaded html into the text input field
      6. Click Check

      Steps to Reproduce - Liferay

      1. Startup Liferay
      2. 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:

      Actual Result:
      Validator shows the error above


      Additional Resources - Discussion regarding topic this in YUI3 repository

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              michael.eguina Michael Eguina
              Reporter:
              jonathan.mak Jonathan Mak
              Participants of an Issue:
              Recent user:
              Joel Garman
              Engineering Assignee:
              Jonathan Mak
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 11 weeks, 4 days ago

                  Packages

                  Version Package
                  7.0.10.13 DXP SP13
                  7.0.X
                  7.1.10 DXP FP17
                  7.1.10.4 SP4
                  7.1.X
                  7.2.10 DXP FP5
                  7.2.10.2 DXP SP2
                  7.2.X
                  7.3.0 CE GA1
                  7.3.1 CE GA2
                  7.3.2 CE GA3
                  7.3.10 DXP GA1
                  Master