dequelabs / axe-linter-action

A GitHub Action to lint for any accessibility issues in your pull requests.
Mozilla Public License 2.0
8 stars 6 forks source link

False-positive on Angular aria-label binding #53

Open JeffreyNordlieTR opened 1 week ago

JeffreyNordlieTR commented 1 week ago

It appears to not be detecting that the button has an aria-label: Image

WilcoFiers commented 3 days ago

@JeffreyNordlieTR thank you for raising this. Yeah that should definitely pass. Surprising.

zlayaAvocado commented 3 days ago

It appears to not be detecting that the button has an aria-label: Image

It looks like the Angular component html file is named -component.html instead of .component.html. Do you have any linting overrides set up in the axe-linter.yml? E.g. something like:

overrides:
  - files: "*.html"
    linter: angular

If yes, it seems like it doesn't currently work as expected and would still show a linting error, and we are investigating why. If the project allows, as a temporary workaround you can rename the component file to .component.html and linting should work correctly.

zlayaAvocado commented 2 days ago

@JeffreyNordlieTR Just an update! We found an issue with the files overrides not working if the file value is a string, however, the array should still work if you would like to set up an override:

overrides:
  - files: 
    - "**/*.html"
    linter: angular