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

Custom-Attribute taglib Accessibility Issue

    Details

      Description

      The custom-attribute taglib is failing an Accessibility Rule where the <label> element is to be explicitly associated to a form control element, in this case <select> element. The <label> requires a for attribute that has a value that is the same as the id attributre of the <select> element. This Accessibility Rule provides assistance to users who need help understanding the purpose of the field as well as a larger clickable area which can be helpful for users with impaired motor control.

      Steps to reproduce:
      1. Navigate to the Control Panel -> Custom Fields -> User
      2. Add Custom Field with a key of "testGroups" and a "Type of Group of Text Values", click Save
      3. To the Values field, add TestGroup1, TestGroup2, Testgroup3, each on their own line.
      4. Change the Display Type to Selection List
      5. Navigate to Control Panel -> Users -> Users & Organizations -> add User
      6. Scroll down to Custom Fields and inspect HTML of the Testgroups

      Expected Results:
      There is a <label> element with a for attribute that matches the id attribute of the <select>

      <label class="control-label" for="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_testGroups"> Testgroups </label>
       <input name="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_ExpandoAttributeName--testGroups--" type="hidden" value="testGroups"> 
       <select class="form-control" id="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_testGroups" name="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_ExpandoAttribute--testGroups--">
      

      Actual Results:
      There is no <label> element or an id for <select>

      <span class="control-label"> Testgroups </span> 
       <input name="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_ExpandoAttributeName--testGroups--" type="hidden" value="testGroups"> 
       <select class="form-control" name="_com_liferay_users_admin_web_portlet_UsersAdminPortlet_ExpandoAttribute--testGroups--"> 
      

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 26 weeks, 6 days ago

                Packages

                Version Package
                7.0.0 DXP FP53
                7.0.0 DXP SP9
                7.0.X
                7.1.0 Beta 1
                7.1.X
                Master