Uploaded image for project: 'Jira Service Management Data Center'
  1. Jira Service Management Data Center
  2. JSDSERVER-16139

Help Center | VO Test: Missing explicit association of form fields

      🚨 This ticket was initially created for Proforma but, we found that the same could be improved in servicedesk. 

      Proforma ticket here: https://jira.atlassian.com/browse/FORMDC-845 

      Issue Summary

      Some labels are not properly associated with their corresponding form fields.

      Steps to Reproduce

      1. Open the Help Center page of the JSM DC instance.
      2. Navigate to the "Portals" section in the main content area and activate the "A11y Test" control.
      3. Navigate to the main content area and activate the "Apple Investigation" > "VO Test" control.
      4. Navigate to the mentioned form fields and inspect the code.
      5. Observe that the "id" attribute is missing from the form fields.

      Screenshot


       

      Actual Results

      When screen reader users navigate through the "VO Test" proforma form, the labels for the "Description", "iOS Version", and "Model Year" form fields are not announced by the screen reader.

      This issue occurs because the labels are not properly associated with these form fields.

      Although the "for" attribute is provided in the <label> element, the "id" attribute is missing in the corresponding <input> elements of these form fields.

      As a result, screen reader users may not understand the purpose of these form fields.

      Expected Results

      The screen reader should correctly announce the labels for the form fields.

      To ensure screen readers announce the labels correctly, the following changes should be applied to the form fields that have a <label> element with the for attribute but are missing the id attribute on the corresponding <input> element.

      Add the id Attribute to the <input> Elements:

      1. Identify each form field where the label has a for attribute but the corresponding <input> element is missing the id attribute.
      2. Add the id attribute to each <input> element to match the label.

      Ensure Proper Association Between Labels and Form Fields:

      1. Verify that the value of the id attribute in the <input> element exactly matches the value of the for attribute in the <label> element.
      2. This establishes the correct relationship between the label and the form field, enabling proper screen reader behavior.

      Code Snippet:

      <label for="a1">Description</label>

      <textarea id="a1">

      ....

      </textarea>

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Environment

      MacBook Pro (16-inch, 2021)
      macOS Sonoma 14.7
      Operations - Windows11
      Chrome - Version 135.0.7049.42 (Official Build) (64-bit)
      Safari- Version 18.0
      Firefox- Version 135.0 (64-bit)
      JAWS- Version 2023
      NVDA- Version 2024.4.2
      VoiceOver - Version Latest

          Form Name

            [JSDSERVER-16139] Help Center | VO Test: Missing explicit association of form fields

            No work has yet been logged on this issue.

              fb78834a366d Jim Alexander
              deddb3877943 Chirag Goyal
              Affected customers:
              2 This affects my team
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: