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

Accessibility errors caused by the use of 'content: normal' from style sheets

    Details

      Description

      If you use this tool (OAW, owned by the Government of Spain) to verify the validity of a website (more about this tool on LPS-133314), the tool complains about the addition of content from CSS files by using the 'content' property.

      The tool throws an error when using 'content: normal' + ':after' or ':before'. Although no new content is added per-se by doing this, the fact is that it is not added to the DOM. 

      From an accessibility point of view, this is not recommended as this content is not accessible for screen readers tools (see link).

       

      Steps to reproduce (master)

      • Add these properties to your portal-ext.properties (for easier debugging)
      minifier.enabled=false
      javascript.fast.load=false
      

       Expected result

      There are no rules like that. The OAW tool does not complain about it.

       Actual result

      There are a couple of rules like that. The OAW tool complains about it. 

      .dropdown-toggle:after {
       border-width: 0;
       content: normal;
      }
      .dropup .dropdown-toggle:after {
       border-width: 0;
       content: normal;
      }
      

       

      Steps to reproduce (7.3.x, 7.2.x)

      • Add these properties to your portal-ext.properties (for easier debugging)
      minifier.enabled=false
      javascript.fast.load=false
      
      • Start the bundle
      • Check for rules containing 'content: normal' in Dev Tools > Sources: localhost:8080/source/compat/components/
        • _bradcrumbs.scss
        • _dropdowns.scss
        • _navbar.scss

       Expected result

      There are no rules like that. The OAW tool does not complain about it.

       Actual result

      There are rules like that. The OAW tool complains about them. 

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevin.wan Kevin Wan
              Reporter:
              jose.bango Jose L. Bango
              Participants of an Issue:
              Recent user:
              Daniel Mijarra García
              Engineering Assignee:
              Jose L. Bango
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                13 weeks, 4 days ago

                  Packages

                  Version Package
                  7.2.10 DXP FP18
                  7.2.X
                  7.3.X
                  7.4.3.15 CE GA15
                  Master