Uploaded image for project: 'PUBLIC - Liferay Alloy UI'
  1. PUBLIC - Liferay Alloy UI
  2. AUI-3187

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

              jonathan.mak Jonathan Mak (Inactive)
              eric.yan Eric Yan
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                2 years, 37 weeks ago

                Packages

                  Version Package
                  master
                  master-deprecated
                  3.0.x
                  3.1.x
                  3.1.0-deprecated.73
                  3.1.0-deprecated.74
                  3.0.3-deprecated.99
                  3.0.3-deprecated.100