[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

Re: don't render ALT="" as "*"



>>>>> In [emacs-w3m : No.10367] jidanni@xxxxxxxxxxx wrote:

> Please make w3m not render a "*" for <img alt="" ...> or with no 'alt'
> at all. Is there an HTML standard that says this is correct? If so
> then you leave a page author no way to print nothing there if he
> really wants to.

> See http://en.wikipedia.org/wiki/Template:Rating
> w3m:
>   {{Rating|4|5}} displays as 4/5 stars****
> lynx:
>   {{Rating|4|5}} displays as 4/5 stars

> Can you believe this was after I got them to fix
> http://en.wikipedia.org/wiki/Template_talk:Rating#Accessibility_issue
> and I was lucky to test in both lynx and w3m, otherwise the
> coincidence of this being about "stars" would make me think their page
> was still broken, when in fact it was w3m!

After some trial-and-errors, I reached to the conclusion that
there is no smart way to solve the problem.  "*" for the null alt
string is brought by w3m by default.  For instance:

echo '<img src="img" alt="" width="8" height="8">'\
 | w3m -halfdump -T text/html
...<img_alt src="img" width="8" height="8" hseq="1" title="">*</img_alt>...

And it can be turned off by the option as follows:

echo '<img src="img" alt="" width="8" height="8">'\
 | w3m -halfdump -T text/html -o ignore_null_img_alt=false
...<img_alt src="img" width="8" height="8" hseq="1" title=""> </img_alt>...

For emacs-w3m you can add that option like the following:

(setq w3m-halfdump-command-arguments
      (append w3m-halfdump-command-arguments
	      '("-o" "ignore_null_img_alt=false")))

(Additionally you may want to set `w3m-treat-image-size' to nil.)

However I don't believe adding such a w3m option is always good.
Maybe only the `T' command is the means to know an image with
the null alt string is there.  Any ideas?

Regards,