OData / odataorg.github.io

Staging site and collaboration repository for http://www.odata.org
MIT License
63 stars 101 forks source link

Add table caption and remove presentation role. #327

Closed habbes closed 1 year ago

habbes commented 1 year ago

Fixes Accessibility Work Item: 2285453

The issue reported conflict from using the presentation role on an element with a global ARIA attribute:

image

I addressed this by removing role="presentation" from all the tables on the page.

The issue also reported that the narrator did not announce the name of the table when entering the table. I'm not sure whether this is something that should happen by default, or if the original developers intended to achieve this using the aria-describedby attribute that's on all the tables on this page, but the narrator wasn't announcing the name. I eventually got the narrator to announce the name by adding caption to each table. Since I only wanted the caption to be read by screen readers, but not displayed on the page, I used the .sr-only class.