On Wed, Apr 20, 2011 at 13:39, Manuel Giraud
<manuel.gir...@univ-nantes.fr> wrote:
> Aankhen <aank...@gmail.com> writes:
>
>> This might not be the best solution.  The purpose of the ‘alt’
>> attribute is to provide a textual alternative, which the file name
>> really isn’t.  It would be better to provide an empty value:
>>
>> [snip]
>
> I knew it was not the best solution: all i wanted was to validate. But
> an empty alt or maybe just "image" is fine by me too.

Fair enough. :-) ‘image’ would be about the same as the file name in
terms of useful alt text.

>> I took a look at ‘org-html.el’ and changed the relevant line, but it
>> doesn’t seem to have any effect.
>
> I've tested my patch only on [[big_image.png][small_image.png]] kind of
> link (maybe that's why).

Possibly—while I was hacking on it, I couldn’t quite pin down when it
had an effect and when it didn’t.

>> [snip]
>
> Ok, those 2 last hunk should complete my patch I guess. But what I'd
> really like is a way to set a alt as a user. Maybe something like this:
>
>   [[big_image.png][small_image.png|my picture is cool]]
>
> What you guys think? I'll look what i can do and try to make it work for
> anykind of <img> tag that can be generated.

Well, there /is/ a way to do that already, it’s just verbose:

,----[ Org ]
| * Foo
| #+ATTR_HTML: alt="The elusive foo in its native habitat."
| [[file:foo.png]]
`----

,----[ HTML ]
| <div id="outline-container-1" class="outline-2">
| <h2 id="sec-1"><span class="section-number-2">1</span> Foo </h2>
| <div class="outline-text-2" id="text-1">
|
| <p><img src="foo.png" alt="The elusive foo in its native habitat." />
| </p></div>
| </div>
`----

I’d suggest using the description part of the link as the alt text,
but then there’d be no way to provide the actual link text (or image,
as the case may be), so that’s a non-starter.

Aankhen

Reply via email to