Re: CSS display property and tables

After thinking it over one more time, I think I have found the final
right argument for not using CSS display property to turn DIV or LIST
elements into tables in order to be able to say: "Look, I have done
away with the last table of design, and only use table markup for data
tables".

By using CSS property "display:table", etc, we turn DIV or LIST markup
into table markup, and if there is any logic to this world, it ought
to be the equivalent of actually using table markup, and the table
semantics will be mapped to the accessibility API.

I might be wrong, but if that is the case, it is very likely that some
implementers have made the same mistake and that user agents  treat
"display:table", "display:table-row", "display:table-cell" very
inconsistently when it comes to the accessibility API.

Much, much better to use a real HTML table for design and
role="presentation", when you need to use a table for that purpose as
an exception to the rule of only using tables for data.

Cheers
Jesper



On Sun, Apr 26, 2015 at 2:25 PM, Jesper Tverskov <jesper@tverskov.dk> wrote:
> I have published a blog-like article, “When even nested tables are
> just great”, at my website:
>
> http://www.friendlytest.com/doc/en.When_even_nested_HTML_tables_are_just_great.html
>
> I would like to hear the Accessibility Community, if there is
> consensus about the use of the CSS display property and the table
> related values, “table”, “table-row” and “table-cell” for short.
>
> In my opinion, tables should be made with table markup. Using e.g.
> “div” elements and the display property to make tables, is not a
> shortcut to get rid of the very last table of design.
>
> If a table of design is necessary as an exception to the rule then use
> a HTML table. It is simply too far out and misuse of the display
> property, confusing, and bound to be less widely supported, to use
> “div” and the display property as a substitute for a HTML table of
> design?
>
> Cheers
> Jesper Tverskov

Received on Wednesday, 13 May 2015 15:44:09 UTC