Closed
Description
The following command:
./tidy --alt-text "moo" --show-body-only yes --quiet yes
run on this input
<img src='http://example.com/example.png'>
produces output
line 1 column 1 - Warning: <img> lacks "alt" attribute
<img src='http://example.com/example.png' alt="moo">
This contradicts the documentation:
https://github.com/htacg/tidy-html5/blob/0ef4493ae8bdc4b8fec125fecf4e1dcc95c30fb1/src/localize.c#L405
which says
"Use with care, as this feature suppresses further accessibility warnings. "
The code clearly doesn't check for the option before issuing the warning:
The warning is issued here:
Line 858 in 0ef4493
which is before the check for the accessibility text:
Line 861 in 0ef4493
The fix is obvious, but I have no idea whether the documentation is incorrect, or the code is incorrect.