Loading ...
Sorry, an error occurred while loading the content.

Add alt parameter to

Expand Messages
  • Platonides
    Hello all, Studying the non-conformant XHTML output at Wikipedia produced by the mediawiki extension EasyTimeline [1] i have narrowed it down to the ploticus,
    Message 1 of 1 , Jul 4, 2008
    • 0 Attachment
      Hello all,
      Studying the non-conformant XHTML output at Wikipedia produced by the
      mediawiki extension EasyTimeline [1] i have narrowed it down to the
      ploticus, which is used by this extension.
      The problem lies in that ploticus mapfile output is of the form:

      <area shape="rect" href="/wiki/Macintosh_Plus" coords="139,11,198,31"
      title="Macintosh Plus" >
      <area shape="rect" href="/wiki/Macintosh_XL" coords="93,76,141,96"
      title="Macintosh XL" >
      <area shape="rect" href="/wiki/Macintosh_SE" coords="185,54,232,75"
      title="Macintosh SE" >

      This produces XHTML validation errors [2], because the <area> element
      must have an alt attribute [3]:
      <!ELEMENT area EMPTY>
      <!ATTLIST area
      %attrs;
      %focus;
      shape %Shape; "rect"
      coords %Coords; #IMPLIED
      href %URI; #IMPLIED
      nohref (nohref) #IMPLIED
      alt %Text; #REQUIRED
      target %FrameTarget; #IMPLIED
      >

      You can find attached a patch against ploticus 2.40 which fixes adds
      this missing alt attribute.
      If there's a title attribute, alt takes its value. Else an empty alt is
      sent.

      I also added a slash at the end of the area, to make it xml-friendly.
      There's a space before it, as recommended by xhtml appendix C2 so i
      don't expect any breakage from it.

      I would be grateful if you incorpored this on next release.
      Best regards

      Platonides


      1- https://bugzilla.wikimedia.org/show_bug.cgi?id=14727
      2-
      http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FTemplate%3ATimeline_of_compact_Macintosh_models
      3- http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd
      4- http://www.w3.org/TR/xhtml1/#C_2
    Your message has been successfully submitted and would be delivered to recipients shortly.