Create pull request : Error message that appear on submission is not communicated

XMLWordPrintable

    Issue Summary

    On the "Create pull request" page, the "Only one pull request may be open for a given source and target branch" error message is not communicated to the users of a screen reader.

    Steps to Reproduce

    1. Navigate onto the above mentioned page.
    2. Navigate onto the "Continue" button and activate it.
    3. Navigate onto the above mentioned input field with a screen reader and trigger the error message by submitting the form with an invalid data.
    4. Observe the presence of an error message.
    5. Observe that this error message is not communicated.

    Screenshot

    Actual Results

    When users submit the form by activating the "Create" button with an invalid data, an error message is dynamically added to the page. The keyboard focus remains on this button and there is no live region. As a result, this error message is not communicated to the users of a screen reader. This may particularly disadvantage users that navigate using assistive technology, such as screen readers. Users may struggle to identify and remediate the errors.

    Expected Results

    Error messages must be communicated to the users of assistive technologies. This can be done through moving focus and live regions. In this scenario, when error message appears dynamically on form submission, make sure that the keyboard focus is moved to the top-most field on the page that has an error. If this is not possible, you can prompt assistive technology to automatically identify the error message using assertive live region. Note that you cannot have multiple live regions announced simultaneously. As well, to work correctly, make sure that you have an empty container with the live region role (such as role="alert" or aria-live="assertive") on it already and then dynamically populate this container when the errors are triggered.

    Code Snippet:

    <span role="alert">Only one pull request may be open for a given source and target branch</span>

    Workaround

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

    Environments

    MacBook Pro (16-inch, 2021)
    macOS Monterey Version 12.4
    Chrome - Version 103.0.5060.134 (Official Build) (arm64)
    Firefox- Version 93.0 (32-bit)
    Safari- Version 15.5 (17613.2.7.1.8)
    JAWS- Version 2022
    NVDA- Version 2020.3
    Voiceover - Version Latest

          Assignee:
          Unassigned
          Reporter:
          Cynthia Singh
          Votes:
          0 Vote for this issue
          Watchers:
          2 Start watching this issue

            Created:
            Updated: