[html4all] some reflections on @alt usage
Jason White
jason at jasonjgw.net
Tue Apr 29 03:36:21 PDT 2008
On Tue, Apr 29, 2008 at 06:00:31AM -0400, Vlad Alexander wrote:
> And that will not change until major Web browsers will begin to report
> invalid markup to the users in some way. There is no incentive for tool
> vendors to generate standards-compliant markup if it gets treated by Web
> browsers the same as tag soup. In fact, HTML 5 will make the problem even
> worse. HTML 5 will help Web browsers parse tag soup better which will then
> provide less incentive for authors and tool vendors to author Web pages to
> specification and thus creating more tag soup on the Web.
Another way of thinking about this is that tag soup thereby becomes part of
the standard. If the error handling is specified, this means that user agents
have to treat "invalid" markup as the spec dictates, which processing can then
be relied on by authors and authoring tools.
This is why I suggested in an earlier contribution that the @alt discussion is
ultimately a question of what markup validators should treat as acceptable.
These days we have accessibility validators as well as markup validators - I
think we need general "good practice" validators (lint for HTML, CSS, etc.), -
but irrespective of this, it is important to realize just how narrow the
issues are which have inspired so much discussion recently.
If you accept the premise of HTML 5 that user agents should parse and handle
broken markup in predictable, specified ways, then the question inevitably
arises as to how missing @alt should be treated. Note that this question
occurs, under the assumptions of HTML 5, regardless of whether the spec goes
on to assert that missing @alt is syntactically incorrect. The only practical
effect of declaring it as syntactically ill-formed, would be to determine what
validating parsers accept.
In the end, I think the answer matters, but not much. That is, there are so
many accessibility-related checks that can be performed, but which go beyond
what a markup validator (even under HTML 4) is required to test, that in order
to produce quality content, any authoring tool will have to implement much
more extensive validation than is required by the HTML spec. This being the
case, I doubt that it makes much practical difference whether @alt is
mandatory or optional in the grammar, given that if it is missing, error
handling will have to be specified (or left for implementations to define),
and any worthwhile validator that checks content for accessibility,
internationalization, or other desirable practices will have to go beyond
syntactic well-formedness testing anyway.
More information about the List_HTML4all.org
mailing list