View page: Keyboard focus not restricted in modal dialog

XMLWordPrintable

    • Severity 3 - Minor
    • Accessibility

      Issue Summary

      When the byline dialog is open, pressing Shift+Tab moves focus to the background content instead of staying in the dialog.

      Steps to Reproduce

      1. Open the Confluence home page
      2. Navigate to any page that has a byline module.
      3. In the main content area, activate a byline link such as "CC ECO Test Byline Item - Dialog" or "CC ECO Test Byline Item - Dialog Module" to open the byline dialog.
      4. Using keyboard or a screen reader, navigate through the modal dialog with Tab and Shift+Tab.
      5. Observe that when pressing Shift+Tab from the first interactive element, focus moves to background content while the dialog remains open.

      Screen Recording

      byline module - focus behaviour.mp4

      Actual Results

      Keyboard focus is not restricted within the byline module dialog (for example, “CC ECO Test Byline Item – Dialog” or “CC ECO Test Byline Item – Dialog Module”). When users press Shift+Tab from the first interactive element, focus moves to background content while the dialog remains open. The same behaviour occurs with screen readers, which then read the background content, creating a confusing experience for both screen reader and keyboard‑only users.

      Expected Results

      Focus should be restricted within the modal dialog when navigating with a screen reader or keyboard, ensuring that both Tab and Shift+Tab keep focus inside the dialog.

      Apply the following changes ->

      • Use aria-hidden="true" and tabindex="-1" on the background page container to hide background content from screen readers and keyboard-only users while the modal dialog is open.
      • Ensure that the aria-hidden and tabindex="-1" attributes are removed from the background container when the user closes the modal dialog.
      • Modify the scripts so that Tab and Shift+Tab always wrap focus between the first and last focusable elements inside the modal dialog, keeping keyboard focus trapped within the dialog in all supported browsers.

      For more information, refer: Modal Dialog Example

      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 26.3 (25D125)
      Windows - 11 pro
      Chrome - Version 145.0.7632.76 (Official Build) (arm64)
      Safari - Version 26.2 (21623.1.14.11.9)
      JAWS - Version 2025
      NVDA - Version 2024.4.2.35031
      Voiceover - Version Latest

              Assignee:
              Arshia Elahi
              Reporter:
              Anusooya .
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: