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

"Behavior" framework makes Hudson config page help buttons inaccessible

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • None
    • Platform: All, OS: All

      You cannot access the help icon buttons on /job/*/configure pages using either
      the TAB key or numbers when using the Firefox Mouseless Browsing (MLB)
      extension. A plain HTML <img> has no KB accessibility as the browser does not
      consider it a real button; it is only made to act like one due to

      .help-button {
      cursor: pointer;
      }

      and

      ".help" : function(e) {
      e.onclick = function()

      { // ... }

      }

      I tried using <input type="image" .../> but could not get this to work; I could
      get the page to display the help but then the browser would try to submit the
      form action. Nor could I get a satisfactory result wrapping the <input> in a
      <form>; not sure how to completely disable a <form> from doing anything except
      where told by onclick. Setting onsubmit for the form did not help; it still
      tried to load a new page. One of those days I'm glad I'm not paid to write web
      apps...

          [JENKINS-105] "Behavior" framework makes Hudson config page help buttons inaccessible

          super_kohsuke added a comment -

          What if we put an <a> tag around it?

          super_kohsuke added a comment - What if we put an <a> tag around it?

          Jesse Glick added a comment -

          <a> tag would probably work but then you need to provide an href attr, which
          would need to be a 'javascript'-protocol URI, which would not be using
          hudson-behavior.js.

          Jesse Glick added a comment - <a> tag would probably work but then you need to provide an href attr, which would need to be a 'javascript'-protocol URI, which would not be using hudson-behavior.js.

          It could be just <a href="#">. The onclick event happens anyway, and we can
          intercept it with our current mechanism.

          Or we don't have to use behavior.js. We can href to javascript URL and call the
          right function (create one if needed) with the right parameter. The only part
          I'm not sure about is how to pass in the 'this' reference.

          Kohsuke Kawaguchi added a comment - It could be just <a href="#">. The onclick event happens anyway, and we can intercept it with our current mechanism. Or we don't have to use behavior.js. We can href to javascript URL and call the right function (create one if needed) with the right parameter. The only part I'm not sure about is how to pass in the 'this' reference.

          Jesse Glick added a comment -

          I'll try <a href="#">.

          Jesse Glick added a comment - I'll try <a href="#">.

          Jesse Glick added a comment -

          Created an attachment (id=15)
          Failed patch

          Jesse Glick added a comment - Created an attachment (id=15) Failed patch

          Jesse Glick added a comment -

          Does not work in Firefox 1.5; "Loading" appears but is not replaced with help text.

          Jesse Glick added a comment - Does not work in Firefox 1.5; "Loading" appears but is not replaced with help text.

          Almost. You needed to move helpURL attribute as well.
          Fix committed. Thanks for the patch.

          Kohsuke Kawaguchi added a comment - Almost. You needed to move helpURL attribute as well. Fix committed. Thanks for the patch.

            Unassigned Unassigned
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: