dequelabs / axe-core

Accessibility engine for automated Web UI testing
https://www.deque.com/axe/
Mozilla Public License 2.0
5.94k stars 774 forks source link

VS Code/Axe Linter Blade and PHP support #3148

Open macbookandrew opened 3 years ago

macbookandrew commented 3 years ago

Product: axe Linter

Expectation: it would be great if you could allow Axe Linter to run for Laravel Blade files as well (.blade.php file extension) and maybe normal PHP files as well, or at least add a user-configurable setting for which file types should be linted

Actual: ignores Blade and PHP files

Motivation: a lot of my work is on Laravel and WordPress sites using Blade and PHP-based templates and it would be awesome to use the linter on them


axe-core version: unsure
axe-webdriver, extension or other integration version: 4.2.1

Browser and Assistive Technology versions

For Tooling issues:
- Node version: 13.6.10
- Platform:  Mac
straker commented 3 years ago

Thanks for the suggestion. We currently don't have a time line for when we would be able to add support for a new language, but we'll leave this issue open as a way to track it.

macbookandrew commented 3 years ago

Is the VS Code extension code public? I can take a stab at a PR if you want

straker commented 3 years ago

It is not

macbookandrew commented 3 years ago

I suspect PHP may be a bigger challenge, but I’d expect Blade to be fairly simple as it’s mostly HTML markup. I’m happy to help test or start some basic work there if you want.

WilcoFiers commented 3 years ago

@macbookandrew That would be great, but as Steve says it's not open source. So far axe-linter only supports component-based technologies. There are some additional challenges to overcome when linting templates, like native PHP, Blade, Handlebars, Liquid, etc.

I have been experimenting with a solution, but I don't expect to see support for a template language added before the end of the year. And it might be a while before we have coverage of all the popular ones. There's an awful lot of them, and many of these template languages are complicated enough that we won't just be able to throw a few regular expressions at it.