What fresh hell is THIS now? - Patrick Lauke
[herin] Hi, I am looking for an accessible solution for an issue.
I have a table of 5 columns and the headers open the help file (The file has internal anchors. So the relevant section of the help file is opened).
Option 1:
If I add a sr-class to the column headers inside a span element - When CSS is turned off this is the repeated info on each column header. Which I am not happy about as it looks like a very long column heading.
Option 2:
If I add a <p> element before the Table and give it an id & make it screen reader only, I can use Aria- described by to associate them with the column header.
For example
<p class="sr-only" id="helpnote"> (A guide to XYZ opens in a new window) </p>
and my TH would look like
<th><a href="..." aria-describedby="helpnote">Heading</a></th>
What do you think about option 2? Is there any other options is better than this?
display: block
on a table has impact on the a11y tree in certain browsers. I was wondering if you know more places where css can have influence (not speaking about contrast and visual a11y here).