TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Re: Alt text on HTML tables From:Alan Houser <arh -at- groupwellesley -dot- com> To:dick -at- rlhamilton -dot- net Date:Fri, 28 Apr 2023 21:52:42 -0400
Hi Richard,
Every time I read the HTML5 spec, I'm impressed by the amount of attention paid to accessibility and semantics. So I thought "there must be a way".
What about the "summary" attribute on the table element? This seems to fit your use case.
However, the HTML5 spec does not favor the summary attribute. Section 4.9.1.1 of the spec, Techniques for Describing Tables, addresses several approaches to benefit all readers, including those who cannot see the table. https://html.spec.whatwg.org/#table-descriptions-techniques
HTH!
-Alan
--
Alan Houser
Group Wellesley, Inc.
Consultant and Trainer, Technical Publishing
arh on Twitter
412-450-0532
> On Apr 28, 2023, at 4:18 PM, dick -at- rlhamilton -dot- net wrote:
>
> Is there a way to add alt text to a table?
>
> The alt attribute is not allowed on table, and I donât see a good alternative.
>
> I know that screen readers can read tables, but in this use case, the column and row labels are the only information of interest (the contents of the cells are examples that donât add any value).
>
> Iâd like to able to add alt text that a screen reader would provide first, so the user could choose to skip the table itself. The alt text would identify the rows and columns and then state that the cell data are samples and donât need to be read.
>
> Any thoughts on how best to do this?
>
> Thanks,
> Richard Hamilton
> -------
> XML Press
> XML for Technical Communicators
>http://xmlpress.net
> hamilton -at- xmlpress -dot- net
>
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Visit TechWhirl for the latest on content technology, content strategy and content development | https://techwhirl.com