Re: CSS display property and tables

Hi Jesper,

26.04.2015, 14:32, "Jesper Tverskov" <jesper@tverskov.dk>:
> 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.

So would I…

> 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.

Agreed.

> 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?

As I understand the way screenreaders work, they use the table markup to interpret tables. Relying on CSS to make things look like tables doesn't allow for things like headers (th) to be associated with cells very easily.

In any event, the CSS tables work is inactive, so the obvious things to work with are the CSS 2.1 properties. Which as the document says are designed to enable laying out tables when using a language *other than HTML*.

In principle you could use the layout combined with aria properties to alert screenreaders, magnifiers, voice control, etc. I have no idea how well it works in practice. If it does work this would be useful for building interactive tables, e.g. providing default layout yourself that played nicer with browser zoom and allowed for sorting, and scrolling the content cells while the headers remained in view - something tables were originally designed to allow but which browsers don't implement in a meaningful way. But I suspect that using HTML table markup for this task works out about the same...

Looks like some testing would be valuable.

cheers

--
Charles McCathie Nevile - web standards - CTO Office, Yandex
chaals@yandex-team.ru - - - Find more at http://yandex.com

Received on Sunday, 26 April 2015 19:22:23 UTC