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 issues : Thumbnail alt and Previous/Next buttons role #468

Closed
trystan2k opened this issue Sep 28, 2022 · 0 comments · Fixed by #471
Closed

A11y issues : Thumbnail alt and Previous/Next buttons role #468

trystan2k opened this issue Sep 28, 2022 · 0 comments · Fixed by #471

Comments

@trystan2k
Copy link

Hi !

What is the expected behavior?

We are using axe-core (https://github.com/dequelabs/axe-core) to test the accessibility of our website (that uses ngx-gallery) and we found 2 issues related to missing attributes.
We expect to not have any a11y errors when using ngx-gallery

What is the current behavior?

The current errors are: in the thumbnails images, that miss the alt attribute (which is already set in the main image) and the previous and next button give us an error saying that the i element cannot have aria-label attribute without a role attribute.

image

What are the steps to reproduce?

Just create a new Angular project with ngx-gallery (the StackBlitz starter, for example) and add a unit test with axe-core

  .run()
  .then(results => {
    if (results.violations.length) {
      throw new Error('Accessibility issues found');
    }
  })
  .catch(err => {
    console.error('Something bad happened:', err.message);
  });```

#### What is the use-case or motivation for changing an existing behavior?
Making ngx-gallery more accessible to everyone.


#### Which versions are you using for the following packages?

Angular: 14.2.2
Angular CDK: 14.2.2
Angular CLI: 14.2.2
Typescript: 4.8.3
Gallery: 7.0.4


#### Is there anything else we should know?
I can provide a PR later with these fixes, if it is ok for you.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants