View Pull Request | Diff: Focus moves inappropriately

XMLWordPrintable

    Issue Summary

    The focus moves inappropriately to the next element "1 1" link instead of moving to the triggering element.

    Steps to Reproduce

    1. Navigate to the mentioned page.
    2. Navigate to the "Diff" tab and activate it.
    3. Navigate to the "Add comment on this file" button and activate it.
    4. Using the screen reader, navigate to the "Cancel" button and activate it.
    5. Observe that the focus moves to the "1 1" link instead of moving to the triggering element.

    Screen Recording

    Screen Recording 2023-10-06 at 12.18.25 PM.mov

    Actual Results

    The focus moves inappropriately to the next element "1 1" link instead of moving to the triggering element "Add comment on this file" button. 
    As a result, keyboard-only and screen reader users will have to navigate the screen content again before accessing the content which is updated below.

    Expected Results

    Ensure that the keyboard focus moves to the triggering element "Add comment on this file" button which can be achieved via the JavaScript focus() method.

    Workaround

    Currently, there is no known workaround for this behaviour.

    Environment 

    MacBook Pro (16-inch, 2019)
    macOS 13.4.1 (c) (22F770820d)
    Chrome - Version 115.0.5790.170 (Official Build) (x86_64)
    Firefox- Version 114.0 (64-bit)
    Safari- Version 16.5.2 (18615.2.9.11.10)
    JAWS- Version 2023.2306.28
    NVDA- Version 2022.2.2
    Voiceover - Version Latest

            Assignee:
            Carlos Sanchez Rosa
            Reporter:
            Rahil Shaikh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: