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

a11y: using span for button with disabled class breaks contrast check #381

Open
anees-tricon opened this issue Nov 18, 2021 · 2 comments
Open

Comments

@anees-tricon
Copy link

anees-tricon commented Nov 18, 2021

Angular version: 11

ngx-pagination version: 5.1.1

Description of issue: in the fist page, previous button appears as disabled. But it is done using disabled class and span element. As a result, running a11y rules via wave extensions gives contrast error

Steps to reproduce: Just install the wave extension and right click and select "WAVE this page" to run the tool

Expected result: Elements with disabled attribute is skipped by the tool and hence there should be no contrast issue

Actual result: Since we are using disabled class and span, the element is scanned for contrast and it fails

just check the tool result on the detault stackblitz url https://angular-e1f9hq.stackblitz.io/

@michaelbromley
Copy link
Owner

Hi,

Thanks for the report.

Elements with disabled attribute is skipped by the tool

Does that mean we can just additionally add a disabled attribute to the <li> and it will then solve the issue?

@anees-tricon
Copy link
Author

Not exactly. disabled attribute is supported on few elements like button, input etc. Ideal solution would be to use buttons instead of span for clickable things. That also makes it semantically correct :)

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