Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-13254

Pull request Diff : The code line number are announced inappropriately to the screen reader user

    XMLWordPrintable

Description

    Issue Summary

    In the Diff section of the pull request, the screen reader announces the line number for the modified code section inappropriately.

    Tested URL:

    https://instenv-17238-xigc.instenv.internal.atlassian.com/projects/TEST/repos/test1/pull-requests/2/diff#index.html?f=12 
    Platform: Bitbucket Datacenter

    Version: 7.21.0

    Steps to Reproduce

    1. Launch the URL
    2. With the screen reader turned on navigate to the main content area to reach the modified code area in the right side section where the line numbers are present for each line of code.

    Screen recording

    Screen Recording 2022-04-14 at 2.36.07 PM.mov

    Actual Results

    In the diff section page of the Pull request overview, for the modified code which is available in the right section of the page, the line number is announced inappropriately to the screen reader user. The screen reader announces it as "link 6 6" in normal tab mode and "Row 6 of 28 link 6 6" which does not make sense and is not understandable to the assistive technology user.

    Expected Results

    Following suggestions could be implemented on the page in order that the screen reader announces the line number in proper order.

    An aria-labelledby could be provided such as aria-labelledby="Line 6 of 28 Same" if the line is added then "Line 6 of 28 Added", if the line is removed then "Line 6 of 28 removed" and if there is an empty line it should announce as "Empty line". 
    This will ensure a clear pattern and will help understand the screen reader users on which line they are and what changes have been made.

     Workaround

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

    Attachments

      Issue Links

        Activity

          People

            91f2c0a8617b Navpreet Ahuja
            2b3f463b7e2d Akhilesh Paradhi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: