Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mfDefaultSorter is failing with ANDI tool for 508 compliance #172

Open
suryahanumandla opened this issue May 13, 2021 · 2 comments
Open

Comments

@suryahanumandla
Copy link

If you are not aware of 508 compliance. In short, a law that requires federal government websites to be safe and accessible for people with disabilities.

while validating with ANDI tool. I could see the following error

Keyboard Access Alerts:
warning element has no [href], [id], or [tabindex]; This might be a link that only works with a mouse.

I feel it would be better to change to any other element rather using anchor element and there is no use of it, correct me if I'm wrong.

@Component({
    selector: "mfDefaultSorter",
    template: `
        <a style="cursor: pointer" (click)="sort()" class="text-nowrap">
            <ng-content></ng-content>
            <span *ngIf="isSortedByMeAsc" class="glyphicon glyphicon-triangle-top" aria-hidden="true"></span>
            <span *ngIf="isSortedByMeDesc" class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span>
        </a>`
})
@suryahanumandla suryahanumandla changed the title mfDefaultSorter is failing with AND tool for 508 compliance mfDefaultSorter is failing with ANDI tool for 508 compliance May 13, 2021
@PascalHonegger
Copy link

Hey @suryahanumandla I'm sort of maintaining a fork over at https://github.com/PascalHonegger/ng-datatable and came accross your issue. I found a fix for your problem in #162 and integrated the changes from there with some tweaking into my latest release.

I kept the <a> tag to reduce the impact on existing styling but added a tabindex and a enter and space keyboard mapping, maybe it can help you out 😉 .

@suryahanumandla
Copy link
Author

thanks @PascalHonegger, let me give a try!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants