Re: Layout or data table?

Hi Louise,


If content is tabular data, then a TABLE should be used. Otherwise, although role="presentation" can be used, it is not ideal, indeed, it is very poor, IF you are able to work without a TABLE.


role="presentation" is helpful when a TABLE is forced on you by a publishing system that is unable to not produce a TABLE.


In this case, with pairs of data, the content could be presented as a TABLE, but also with a DL (DT, DD).


The H2 should be a CAPTION tag within the TABLE (for better semantics).


CSS should be used to choose how to present the content (of course) and so the decision about whether to use a TABLE or not is lifted above the decision about how content will be presented and rests purely on what the data is.


I hope this is helpful. I find these types of data, pairs of data, are sometimes a grey area in that they could be a TABLE *or* a DL. However often I will favour a TABLE as the CAPTION is then semantically linked to the content, rather than an H2 that just comes before the DL, implying a relationship, but inevitable a weaker one than between a CAPTION and the contents of a TABLE.


Regards,


Alan


-Alan Bristow
Web Programmer
?Elections Canada
alan.bristow@elections.ca



________________________________
From: Louise Lister <Louise.Lister@iop.org>
Sent: Wednesday, April 7, 2021 9:54 AM
To: WAI Interest Group discussion list
Subject: Layout or data table?



Hello all,

I hope you can assist.

On our website we have some tables that contain information on committee member names and their roles, so for example:

Committee members

Chair

Mr A*

Treasurer

Mrs Y

Ordinary member

Mr C

Ordinary member

Mr G

Ordinary member

Ms P


In this case, the title is a h2 and each role in the left-hand cell carries the <th scope> value.  To all intents and purposes, we have treated it as a data table, but is it a layout table because the information could be presented in linear fashion another way? And if so, should it have a role="presentation" value in it?

I feel this is a bit of a grey area between the two and would appreciate your thoughts. It reads out fine in NVDA so I don't think it's an issue, but wanted to make sure we were accounting for our tables correctly!

With thanks
Louise





________________________________
This email (and attachments) are confidential and intended for the addressee(s) only. If you are not the intended recipient please immediately notify the sender, permanently and securely delete any copies and do not take action with it or in reliance on it. Any views expressed are the author's and do not represent those of IOP, except where specifically stated. IOP takes reasonable precautions to protect against viruses but accepts no responsibility for loss or damage arising from virus infection. For the protection of IOP's systems and staff emails are scanned automatically..

Institute of Physics. Registered charity no. 293851 (England & Wales) and SCO40092 (Scotland)
Registered Office:  37 Caledonian Road, London, N1 9BU<https://goo.gl/maps/DUHbKcbzuUN2>

Your privacy is important to us. For information about how IOP uses your personal data, please see our Privacy Policy<https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.iop.org%2Fprivacy%2Findex.html&data=02%7C01%7C%7C6716aa3c6fd84da5102808d5c0b234a0%7Cf9ee42e6bad04e639115f704f9ccceed%7C0%7C0%7C636626793962820374&sdata=RI6OT4MumRlklNzF5i2M9ZxS6P%2FxxLg%2FJwcnMJ%2B0480%3D&reserved=0>

________________________________

Received on Wednesday, 7 April 2021 14:09:43 UTC