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

enable git-plugin to support alt content for people who aren't seeing images

XMLWordPrintable

      https://github.com/jenkinsci/git-plugin/blob/d77f380de81404758970f52b3b90f3e6d04ca7c7/src/main/resources/hudson/plugins/git/util/BuildDetails/summary.jelly

      <t:summary icon="/plugin/git/icons/git-48x48.png"> 

      is accessibility hostile.

      I browse w/ images off by default.

      I can't figure out how to make this work well.

      Ideally the git-plugin would use <t:summary icon="git"> and things would magically work (it would presumably need to register the git icon plugin, and someone should be able to figure out how to do that).

      That jelly feeds to this:

      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/hudson/summary.jelly#L78

      Which doesn't have a particularly good way to calculate an alt tag because https://github.com/jenkinsci/icon-shim-plugin/blob/9e75ab65fb8e4f1b5678408d39824abb5ff04313/icon-set/src/main/java/org/jenkins/ui/icon/Icon.java#L92 does it no favors. (The sorting stuff is really great for ensuring one can't safely reparse anything to get useful information back – because they might randomly select a size class instead of the image class.)

      But, https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/layout/icon.jelly doesn't automatically calculate an alt tag.

      A simple example of this all going wrong is:

      https://github.com/jenkinsci/jenkins/blob/master/core/src/main/resources/lib/layout/layout.jelly#L232

      Which has:

                    <a href="${%searchBox.url}"><l:icon class="icon-help icon-sm" /></a> 

      Ideally that would be sufficient to magically trigger at least an alt="[help]" – without additional work by the author of layout.jelly.

      For the time being, I'm marking this as a "story".

      The story is simple:

      1. start Chrome
      2. disable images and javascript by default
      3. visit https://ci.centos.org/job/bodhi-pipeline/job/PR-3131/2/
      4. try to interpret the page

      Actual results:

      For comparison:

       

      Elements visually lost:

      1. The help button to the right of the search box
      2. The search icon inside the search box
      3. The orange-square whatever icon to the left of pull request (it's actually called orange-square, which is really unhelpful)
      4. The git icon to the left of revision (this could be mercurial or bzr or various other things)
      5. Because of the rendering, it's unclear that Failed is actually image alt content and not just random content next to a missing image of something else. (This is normally managed by using [...] instead of just .... – See one of the instances of [Jenkins] at the top.

            Unassigned Unassigned
            jsoref Josh Soref
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: