Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-23148

Accessibility problem when editing shell script in the configuration of a job

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • core
    • Linux 2.6.18 X86_64 / JDK1.6 (OpenJDK 1.6.0_17 X64), jenkins war distribution

      I'm blind user and to browse through a website I use a screen reader. Since I have updated jenkins from 1.439 to 1.563, I can't edit a script in the text area of a shell step in the configuration page of a job. I can only read the script.
      I checked in the source of the page and the text area seems ok.
      I tested with the following screen readers:

          [JENKINS-23148] Accessibility problem when editing shell script in the configuration of a job

          Daniel Beck added a comment -

          1.439 to 1.563 is a pretty big jump!

          Could you try 1.560 to see whether the issue occurs there as well? There was a change related to a newly integrated version of CodeMirror (https://github.com/jenkinsci/jenkins/commit/5789f0c75c3782f5c58d594ccced90428712ecdf).

          Other than that, it'd help if you could do a "binary" search to narrow down the version range (or at least explain how to reproduce the issue).

          Daniel Beck added a comment - 1.439 to 1.563 is a pretty big jump! Could you try 1.560 to see whether the issue occurs there as well? There was a change related to a newly integrated version of CodeMirror ( https://github.com/jenkinsci/jenkins/commit/5789f0c75c3782f5c58d594ccced90428712ecdf ). Other than that, it'd help if you could do a "binary" search to narrow down the version range (or at least explain how to reproduce the issue).

          Actually, you are right.
          I downloaded the 1.549 version of jenkins at http://jenkins.mirror.isppower.de/war/1.549/jenkins.war and tested it on my local machine which is running on Windows.
          I can't reproduce this issue with it.

          So I'm explaining how to reproduce this issue with a >= 1.560 version of jenkins but my englsih is quite bad and hope that you are understanding :

          • If you're running on windows Download and install the screen reader NVDA at www.nvaccess.org (it is free)
          • During the installation you should ear a voice. This voice says what you see on the screen.
          • Complete the installation
          • Run a browser in example firefox (fhe latest version 29.0.1)
          • Go to the board of your jenkins and choose a job which has a shell script step configured
          • In the job page, click on "configure" to edit the job
            NB: In the next step, you should know that NVDA has a virtual buffer to represent a web content and provides shortcuts to navigate through the elements of a web page.
            In example, to go to the next edit field, you should type 'e', the next button 'b' radio button 'r' ... and shift + e to go to previous edit field ...
            To read and edit the content of an element like an edit field, you must hit the space bar to enter in.
          • With the shortcut 'e', navigate until NVDA says 'edit multiline'. If the rate of the voice is too fast, decrase it with (NVDA key + CTRL + the right and left arrow keys to select "rate" setting and decrease it with the down arrow key. The NVDA key is the 0 of your numeric pad.
          • As explained below, to read and edit the shell script you should type on the space bar.
          • Then, with the up and down arrow key, you should ear the lines of the shell script. With left and right arrow key you navigate character by character.

          In jenkins 1.563 I can navigate through the differents lines of my shell script so I can't edit it.

          I really hope that you understand me .

          Thanks in advance.

          guillaume gourdier added a comment - Actually, you are right. I downloaded the 1.549 version of jenkins at http://jenkins.mirror.isppower.de/war/1.549/jenkins.war and tested it on my local machine which is running on Windows. I can't reproduce this issue with it. So I'm explaining how to reproduce this issue with a >= 1.560 version of jenkins but my englsih is quite bad and hope that you are understanding : If you're running on windows Download and install the screen reader NVDA at www.nvaccess.org (it is free) During the installation you should ear a voice. This voice says what you see on the screen. Complete the installation Run a browser in example firefox (fhe latest version 29.0.1) Go to the board of your jenkins and choose a job which has a shell script step configured In the job page, click on "configure" to edit the job NB: In the next step, you should know that NVDA has a virtual buffer to represent a web content and provides shortcuts to navigate through the elements of a web page. In example, to go to the next edit field, you should type 'e', the next button 'b' radio button 'r' ... and shift + e to go to previous edit field ... To read and edit the content of an element like an edit field, you must hit the space bar to enter in. With the shortcut 'e', navigate until NVDA says 'edit multiline'. If the rate of the voice is too fast, decrase it with (NVDA key + CTRL + the right and left arrow keys to select "rate" setting and decrease it with the down arrow key. The NVDA key is the 0 of your numeric pad. As explained below, to read and edit the shell script you should type on the space bar. Then, with the up and down arrow key, you should ear the lines of the shell script. With left and right arrow key you navigate character by character. In jenkins 1.563 I can navigate through the differents lines of my shell script so I can't edit it. I really hope that you understand me . Thanks in advance.

          Jesse Glick added a comment -

          It seems very likely that the hotfix of JENKINS-23151 (in 1.567) would solve this issue for you. I am guessing that the authors of CodeMirror simply never considered the effect on accessibility. Internally it seems to hide the original textarea and then use JavaScript to insert a new page area with the colored text with special behavior. In other words, it is quite different than a styled text area in, say, (Java) Swing, which follows the same data model as a plain text area but adds style annotations. In that case the question is whether CodeMirror can be used at all, for anything in Jenkins.

          Jesse Glick added a comment - It seems very likely that the hotfix of JENKINS-23151 (in 1.567) would solve this issue for you. I am guessing that the authors of CodeMirror simply never considered the effect on accessibility. Internally it seems to hide the original textarea and then use JavaScript to insert a new page area with the colored text with special behavior. In other words, it is quite different than a styled text area in, say, (Java) Swing, which follows the same data model as a plain text area but adds style annotations. In that case the question is whether CodeMirror can be used at all, for anything in Jenkins.

          Daniel Beck added a comment -

          1.567 has been released. Guillaume, could you try it?

          Daniel Beck added a comment - 1.567 has been released. Guillaume, could you try it?

          Daniel Beck added a comment -

          Also, could you try whether the same issue occurs for descriptions of build parameters? Freestyle project, 'This build (sic) is parameterized', add a parameter, and edit its description. May depend on your markup formatter configured in the security configuration though.

          Daniel Beck added a comment - Also, could you try whether the same issue occurs for descriptions of build parameters? Freestyle project, 'This build (sic) is parameterized', add a parameter, and edit its description. May depend on your markup formatter configured in the security configuration though.

          guillaume gourdier added a comment - - edited

          In jenkins 1.563 and the latest (1.567), for the description field of a parameter in a freestyle project, I confirm that I reproduce this issue with Markup Formatter setting parameter is raw-html. On the other hand, I haven't any accessibility issue when the markup formatter is Escaped HTML.

          For the main problem of this issue, in 1.567, the accessibility bug is fixed. I can edit the shell script directly in the text area with my screen reader.

          Thank you for your work around and if I well understood, you have downgraded the version of CodeMirror that jenkins used in version lesser than 1.567 to fix temporarily the issue of the shell script text area ?

          guillaume gourdier added a comment - - edited In jenkins 1.563 and the latest (1.567), for the description field of a parameter in a freestyle project, I confirm that I reproduce this issue with Markup Formatter setting parameter is raw-html. On the other hand, I haven't any accessibility issue when the markup formatter is Escaped HTML. For the main problem of this issue, in 1.567, the accessibility bug is fixed. I can edit the shell script directly in the text area with my screen reader. Thank you for your work around and if I well understood, you have downgraded the version of CodeMirror that jenkins used in version lesser than 1.567 to fix temporarily the issue of the shell script text area ?

          Jesse Glick added a comment -

          No, we simply backed out the usage of CodeMirror here.

          Jesse Glick added a comment - No, we simply backed out the usage of CodeMirror here.

          Daniel Beck added a comment -

          Guillaume:

          I confirm that I reproduce this issue with Markup Formatter setting parameter is raw-html.

          You can disable syntax highlighting for "Raw HTML" in the security preferences. Does that resolve the issue?

          Daniel Beck added a comment - Guillaume: I confirm that I reproduce this issue with Markup Formatter setting parameter is raw-html. You can disable syntax highlighting for "Raw HTML" in the security preferences. Does that resolve the issue?

          YES it does. Thank you for the tip.

          guillaume gourdier added a comment - YES it does. Thank you for the tip.

          Hello, I still have this bug (jenkins 2.32.1) and I must have to upgrade our jenkins version. Any idea of the bug resolution ?
          If I can help you.
          Thank you

          guillaume gourdier added a comment - Hello, I still have this bug (jenkins 2.32.1) and I must have to upgrade our jenkins version. Any idea of the bug resolution ? If I can help you. Thank you

          Daniel Beck added a comment -

          bill11223344

          Could you clarify what you're behavior you're experiencing? The last thing you wrote is:

          For the main problem of this issue, in 1.567, the accessibility bug is fixed. I can edit the shell script directly in the text area with my screen reader.

          You also wrote that disabling the HTML preview worked for other text fields, like descriptions of build parameters.

          Is there a regression?

          Daniel Beck added a comment - bill11223344 Could you clarify what you're behavior you're experiencing? The last thing you wrote is: For the main problem of this issue, in 1.567, the accessibility bug is fixed. I can edit the shell script directly in the text area with my screen reader. You also wrote that disabling the HTML preview worked for other text fields, like descriptions of build parameters. Is there a regression?


          Hello, It's the same problem yes ; I think so.

          guillaume gourdier added a comment - Hello, It's the same problem yes ; I think so.

          Daniel Beck added a comment -

          https://twitter.com/MarijnJH/status/1021362974701891584 I hope we'll be able to update to the latest release that includes any fixes motivated by this.

          Daniel Beck added a comment - https://twitter.com/MarijnJH/status/1021362974701891584 I hope we'll be able to update to the latest release that includes any fixes motivated by this.

            Unassigned Unassigned
            bill11223344 guillaume gourdier
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: