changeset 1995:1c8edc5706b7

set alt attribute of attachment images (required by html4)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 16 Apr 2007 22:46:57 +0200
parents 9051a3a23124
children 6c4f6efbb36e
files MoinMoin/formatter/text_html.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/formatter/text_html.py	Sat Apr 14 14:02:14 2007 +0200
+++ b/MoinMoin/formatter/text_html.py	Mon Apr 16 22:46:57 2007 +0200
@@ -658,8 +658,11 @@
                  (wikiutil.quoteWikinameURL(pagename),
                   wikiutil.url_quote_plus(fname))),
                 linktext % {'filename': self.text(fname)})
+        if not 'alt' in kw:
+            kw['alt'] = _('Inlined image: %(url)s') % {'url': self.text(url)}
         return self.image(
             title="attachment:%s" % url,
+            alt=kw['alt'],
             src=AttachFile.getAttachUrl(pagename, filename, self.request, addts=1),
             css="attachment")