W3C home > Mailing lists > Public > www-style@w3.org > May 2018

Re: multi-col table layout Fwd: accessible tables

From: Florian Rivoal <florian@rivoal.net>
Date: Wed, 9 May 2018 11:39:45 +0900
Cc: www-style@w3.org
Message-Id: <E4365A0E-23B0-41BC-9A79-737A5D28535F@rivoal.net>
To: Chaals Nevile <chaals@yandex.ru>


> On May 9, 2018, at 0:10, Chaals Nevile <chaals@yandex.ru> wrote:
> 
> Florian, many thanks for this...
> 
> On Tue, 08 May 2018 14:47:49 +0200, Florian Rivoal <florian@rivoal.net> wrote:
> 
>> This should be doable with standard css. Multicol implementations are still somewhat buggy and/or incomplete, but otherwise this should work, and it does in chrome and safari (maybe edge also, but I'm on a mac, so I did not test):
> 
> It did work for me in edge...

I suspected it would, but wasn't sure. Good.

> (And if you have any insight into how far this might be from working in Firefox, that would be helpful too)


I think it's not too far off. The missing part is column-span, and I believe that Mozilla is planning to implement it. At the very least, they've made comments recently in the CSSWG that shows they've been reviewing how it works and filed bugs against the spec when that was not clear.

>> The only difference with your plaintext rendering is that the column headers are not repeated. If that's needed to, the story gets longer.
> 
> That is needed too, so I would be grateful for the details...
> 
> In particular, I am not sure why the table is display:block - I am guessing that it is because multicol only works within block.


The table is display:block because the columns property does not apply to table wrapper boxes (I am not sure why. Maybe we should have an issue about that). It can fragment them, though, if the table is inside a multicol. So maybe the table a block gets rid of that, and the table is still functions as a table: since its descendants are table parts, and since such things cannot live directly as children of a block anonymous boxes of the right kind get generated to repartent them.

The table caption is turned into a block as well for similar reasons: if it was not, as it is a table part, it would get re-wrapped to be a child of the anonymous table. But only elements that are in the same formatting context as the multicol itself can span, so that would exclude it. By making it into a block instead of a table part, it stays outside of the anonymous table, and this is satisfied.

Now, as for the actual repetition of the table headers:
CSS21 says that UAs may repeat them when paginating. css-tables-3 says UA must do so in a very limited set of circumstances (the table is fragmented to pages (as opposed to columns or other things), the repetition wouldn't take more than half the page, the headers / footers have break-inside:avoid applied to them), and that UAs may do so in other circumstances.

I've just checked and adding this makes it repeat in Chrome (but not in Safari):

  thead { break-inside: avoid; }

What about Edge?

In addition, I think that leaving is up to the UA is not great, so I've proposed a way to opt in or out explicitly (as well as enabling the same repetition logic on things other than table headers / footers):
https://specs.rivoal.net/css-repeat/

Last time I spoke about this, it seemed there was mild support for it, but I have not had the time or budget to pursue this further.

—Florian
Received on Wednesday, 9 May 2018 09:40:25 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 9 May 2018 09:40:25 UTC