Important
This extension is in early development/proof-of-concept stages and not ready for regular/production usage.
A VS Code extension that provides accessibility linting/hinting for HTML and PHP files using axe-core based on the Google Lighthouse Accessibility scores. This extension helps you identify accessibility issues in your code while you type.
A lot of other accessibility linters are available, but very few (if any) provide support for PHP files, or are specifically targeted to work with Google Lighthouse Accessibility checks.
Note
This is a personal project, not sponsored by or associated with Google Lighthouse or the Los Angeles International Airport in any way :)
- Real-time accessibility checking for HTML and PHP files
- Integration with VS Code's native linting system
- Based on the Google Lighthouse Accessibility scoring system
- Uses axe-core under the hood
- Detailed error messages with links back to the a11y rules for more information
- Configurable rule sets (TBC)
- Install the extension from the VSCode Marketplace
- Reload VSCode
The extension will automatically start linting your HTML and PHP files when you open them. Accessibility issues will be highlighted in the editor with detailed information about the problem and how to fix it.
You can configure the extension through VSCode's settings:
{
"laxLinter.enabled": true,
"laxLinter.run": "onSave|onType",
"laxLinter.debounceDelay": 500,
"laxLinter.maxFileSize": 0,
}
laxLinter.enabled
: Enable/disable the linterlaxLinter.run
: Select either "onSave" (default) or "onType" for when the linting happenslaxLinter.debounceDelay
: The debounce delay in milliseconds for linting the current doc (500ms default)laxLinter.maxFileSize
: Maximum file size to lint (in bytes), default is unlimited (0)
To build and run the extension locally:
- Clone this repository
- Run
npm install
- Run
npm run compile
- Press F5 to start debugging
- VSCode 1.85.0 or higher
- Node.js 16.x or higher
MIT
- [] Add command(s) for manually linting a file
- [] Add better settings options for configuring the extension
- [] Improve the accuracy of linting error reporting/highlighting
- [] Add support for more languages natively, such as JSX/React, etc.
v0.0.1-dev WIP