View Profile: Error messages not associated with input field

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      An error message is occurred when user hit on "Follow" button.

      Steps to Reproduce

      1. Navigate to the "Profile picture for admin" button present in the header.
      2. Activate it, it will expand with few options.
      3. Select "Profile" option among those option.
      4. "View Profile" page will be appear on the screen.
      5. Navigate to "Network" link and activate it.
      6. Navigate to "Follow" button with empty field and activate it.
      7. Observe that an error message is appeared on the screen but not announced for screen reader users.

      Screenshot

      Actual Results

      When users submit the "User name" input field empty, error messages such as "You must select a user to follow" get dynamically displayed below the form field and user's focus remains on the "input field" button.
      As a result, screen reader users are unaware of the occurrence of errors.

      Similar issue found in "Setting" tab.

      Expected Results

      Apply the following changes:

      • Add the 'aria-describedby' attribute to the form field.
      • Reference the 'id' attribute value of the container used to display the error message to the 'aria-describedby' attribute.
      • Set focus on the first field with an error using the JavaScript .focus() method as soon as the form is submitted.

      Code Snippet

      <input aria-describedby="error1"class="text autocomplete-user follow-user-box" type="text" name="username" role="combobox" aria-haspopup="listbox" tabindex="0" value="" data-max="10" data-template="{literal}{title}{/literal}" data-autocomplete-user-or-group-bound="true" autocomplete="off" placeholder="User name" data-last-search="">
      (...)
      <div id="error1">
      <img src="/s/c6jahy/9011/y1zith/ABSOLUTE/_/images/icons/emoticons/error.png" width="16" height="16">
      You must select a user to follow
      </div>

      Workaround

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

      Environment

      MacBook Pro (16-inch, 2019)
      macOS Ventura Version 13.3.1
      Chrome - Version 114.0.5735.198 (Official Build) (x86_64)
      Firefox- Version 112.0.1 (64-bit)
      Safari- Version 16.4 (18615.1.26.11.23)
      JAWS- Version 2022
      NVDA- Version 2020.3
      Voiceover - Version Latest

            Assignee:
            Unassigned
            Reporter:
            Varsha Bansode (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: