Sidebar: Keyboard focus does not return to the triggering element of modal dialog

XMLWordPrintable

    • 9.12
    • Severity 3 - Minor

      Issue Summary

      As soon as the users dismiss the "Add shortcut" modal dialog (that becomes available on activating "Add shortcut" link), the focus moves to the top of the page inappropriately.

      Steps to Reproduce

      1. Open any project.
      2. Navigate to the "Sidebar".
      3. Navigate to the "Add shortcut" link and activate it.
      4. A modal dialog appears on the page.
      5. Try to dismiss the modal dialog using "Cancel" button or "ESC" key.
      6. Observe that the focus moves to the top of the page inappropriately.

      Screen Recording

      [SC-3] Heading - InstEnv Jira - Google Chrome 2024-02-08 11-42-20.mp4

      Actual Results

      On closing the "Add shortcut" modal dialog, the programmatic focus does not return to the triggering element. Instead the focus is moves to the top of the page. This required screen reader users and keyboard-only users to tab pass the content on the page before they can interact with the content after the triggering element.

      Expected Results

      Set the keyboard focus to the triggering element of the dialog using the JavaScript .focus().

      Workaround

      Required, if there is no workaround please state:
      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Environment

      MacBook Pro (16-inch, 2021)
      macOs Monterey Version 12.3.1
      Chrome - Version 101.0.4606.81 (Official Build) (64-bit)
      Firefox- Version 93.0 (32-bit)
      Safari- Version 15.3 (17612.4.9.1.5)
      JAWS- Version 2022
      NVDA- Version 2020.3
      Voiceover - Version Latest

            Assignee:
            Unassigned
            Reporter:
            Rinku Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: