Aryeh Gregor <Simetrical+wikilist <at> gmail.com> writes:
> Oh, I see. That's really terrible, then, and we should avoid
> presentational tables if at all possible. I think this really has to
> be done on the content side, though, not on the software side --
> auto-translating tables to divs sounds like a bad idea.
IE doesn't recognize display: table-*, and without that simulating
presentational tables is a nightmare. Tables have an intelligent width
computation algorithm (which might not be consistent between browsers, but still
works pretty well in practice), AFAIK you cannot do anything even remotely
similar with divs and display: block. And there are a lot of complicated use
cases for navboxes - stacking them inside each other, making them collapsible
etc. (There are easier targets such as {{ambox}} which doesn't really take
advantage of having a table-based layout.)
Given the prevalence of table-based layouts and the inadeqacy of CSS (as
understood by some older but widely used browsers) to replace them, screen
readers should be able to deal with them, or at least accept some sort of hint.
WAI-ARIA does provide such a hint, the presentation role (
http://www.w3.org/TR/wai-aria/roles#presentation ); I don't know how widely it
is understood by readers.
> Maybe we could remove attributes like cellpadding, cellspacing, align,
> etc. from the attribute whitelist. That would make it much harder to
> use presentational tables, wouldn't hurt non-presentational table use
> much, and would also improve our standards conformance (HTML5 bans
> them). We'd have to announce this way in advance and give people
> tools to adapt content before we break everything, but it'd be doable
> if we really wanted.
Those all have CSS equivalents, so all it would achieve is to make
presentational tables look uglier in older browsers where the CSS versions of
those attributes are sometimes buggy.
> I'm fine with that. However, I'm not sure if we should assume that
> images are probably presentational, or that they're probably
> meaningful. A lot of images on Wikipedia are decorative, but a lot
> aren't. If we omitted the alt attribute entirely, it would help to
> alert people by triggering validation errors, so maybe that's the best
> approach. It would help if we gave people tools to spot bad alt text
Presentational images do (or should) set the click attribute most of the time;
that might be a useful heuristic to set alt="".
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l