cortezaproject / corteza

Low-code platform
https://cortezaproject.org
Apache License 2.0
1.65k stars 375 forks source link

Add a 'scope' attribute to <th> tags #2021

Closed McLaynV closed 1 week ago

McLaynV commented 2 weeks ago

The following changes are implemented

Add a 'scope' attribute to tags.

Changes in the user interface:

Better support for screen readers. This increases the accessibility of tables to visually impaired users.

Checklist when submitting a final (!draft) PR

Reasoning

Associating <table> headers, i.e. <th> elements, with their <td> cells enables screen readers to announce the header prior to the data. This considerably increases the accessibility of tables to visually impaired users.

There are two ways of doing it:

It is recommended to add scope attributes to <th> headers whenever possible. Use <th id="..."> and <td headers="..."> only when <th scope="..."> is not capable of associating cells to their headers. This happens for very complex tables which have headers splitting the data in multiple subtables. See W3C WAI Web Accessibility Tutorials for more information.

Fajfa commented 1 week ago

Sounds reasonable, will check/merge