mattiash / angular-tablesort

Sort angularjs tables easily
MIT License
185 stars 66 forks source link

ADA Compliance: Added keypress functionality #93

Closed Elegant-Bird closed 7 years ago

Elegant-Bird commented 7 years ago

In order for the keyboard to be able to tab to the headers, you should add a tabindex of zero to each header. For example:

        <tr>
            <th scope="col" tabindex="0" aria-label="Sort by User Name" ts-criteria="username">User Name</th>
            <th scope="col" tabindex="0" aria-label="Sort by Prefix" class="mini-field" ts-criteria="name.prefix">Prefix</th>
            <th scope="col" tabindex="0" aria-label="Sort by First Name" ts-criteria="name.firstName">First Name</th>
            <th scope="col" tabindex="0" aria-label="Sort by Middle Name" class="mini-field" ts-criteria="name.middleName">Middle</th>
            <th scope="col" tabindex="0" aria-label="Sort by Last Name" ts-criteria="name.lastName">Last Name</th>
            <th scope="col" class="action-buttons">Action</th>
        </tr>

`