Uploaded image for project: 'Batik'
  1. Batik
  2. BATIK-927

Batik should display anchor "xlink:title" attribute contents as a tooltip

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Resolution: Unresolved
    • Affects Version/s: 1.8
    • Fix Version/s: None
    • Component/s: Bridge
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All

      Description

      A tooltip is not displayed whenever a anchor ("a" element) has the "xlink:title" attribute [1] set.

      Batik already displays the contents of "title" and "desc" elements as tooltips, as suggested by the SVG specification [2], so I'd say we should also display the link title.

      I'm not sure how precedence should be handled (when a given link has "xlink:title" attribute and child "title"/"desc" elements), but it is suggested [3] that "xlink:title", when set, should take precedence over the other.

      A current workaround consists of adding a "title" child element to the anchor with the same content as the "xlink:title" attribute, which is then rendered by Batik. A test case with this idea was implemented [4] during experiments in order to force a pointer cursor in ASV3: one would expect a tooltip when hovering on the blue (leftmost) circle.

      [1] http://www.w3.org/TR/SVG/struct.html#XLinkTitleAttribute
      [2] http://www.w3.org/TR/SVG/struct.html#DescriptionAndTitleElements
      [3] http://www.w3.org/Graphics/SVG/IG/wiki/Accessibility_Activity#Title_As_Tooltip
      [4] http://heldermagalhaes.com/stuff/svg/hacks/ASV3-EmulatePointerCursor.svg

        Attachments

        1. Batik-Bug48073-Testcase.svg
          0.8 kB
          Helder Magalhães

          Activity

            People

            • Assignee:
              batik-dev@xmlgraphics.apache.org Batik Developer's Mailing list
              Reporter:
              helder.magalhaes@gmail.com Helder Magalhães
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: