Package Exports
- @flatelectronics/accessibility-lsp-server
- @flatelectronics/accessibility-lsp-server/dist/server.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@flatelectronics/accessibility-lsp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
Bumi Accessibility LSP Server
A Language Server Protocol (LSP) server for accessibility linting that can be used with any LSP-compatible editor, including JetBrains IDEs (IntelliJ IDEA, WebStorm, PHPStorm, etc.).
Developer: Flat Electronics Canada Limited
License: MIT
GitHub: https://github.com/bumi-ca/accessibility-scanner-core
Features
- 19 accessibility rules covering WCAG 2.0, 2.1, and 2.2
- Support for HTML, JSX/TSX, Vue, Angular, and Razor files
- Real-time diagnostics as you type
- Quick fixes for common accessibility issues
- ARIA completions for roles and attributes
- Configurable WCAG conformance level (A, AA, AAA)
Installation
From npm
npm install -g @flatelectronics/accessibility-lsp-serverFrom source
cd lsp-server
npm install
npm run buildUsage
Starting the Server
The server communicates via stdin/stdout:
bumi-lsp
# or
node dist/server.jsJetBrains IDE Setup (IntelliJ, WebStorm, etc.)
JetBrains IDEs require the LSP4IJ plugin to connect to LSP servers.
Step 1: Install LSP4IJ Plugin
- Open your JetBrains IDE (IntelliJ IDEA, WebStorm, etc.)
- Go to Settings/Preferences > Plugins
- Click Marketplace tab
- Search for "LSP4IJ"
- Click Install and restart the IDE
Step 2: Configure Bumi LSP Server
Go to Settings/Preferences > Languages & Frameworks > Language Servers
Click the + button to add a new server
Configure the server:
- Name:
Bumi Accessibility - Command:
bumi-lsp(if installed globally) or the full path tonode /path/to/lsp-server/dist/server.js - File patterns:
*.html;*.htm;*.jsx;*.tsx;*.vue;*.cshtml;*.razor
- Name:
Click OK to save
Step 3: Verify Installation
- Open an HTML or JSX file
- Add an
<img>tag without analtattribute - You should see a diagnostic warning from Bumi
Neovim Setup
Using nvim-lspconfig:
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
if not configs.bumi then
configs.bumi = {
default_config = {
cmd = { 'bumi-lsp' },
filetypes = { 'html', 'javascriptreact', 'typescriptreact', 'vue' },
root_dir = lspconfig.util.root_pattern('package.json', '.git'),
settings = {
bumi = {
enabled = true,
wcag = {
version = '2.2',
level = 'AA'
}
}
}
}
}
end
lspconfig.bumi.setup{}Sublime Text Setup
Using LSP package:
{
"clients": {
"bumi": {
"command": ["bumi-lsp"],
"enabled": true,
"selector": "source.html, source.jsx, source.tsx, text.html.vue",
"settings": {
"bumi": {
"enabled": true,
"wcag": {
"version": "2.2",
"level": "AA"
}
}
}
}
}
}Emacs Setup
Using lsp-mode:
(require 'lsp-mode)
(lsp-register-client
(make-lsp-client
:new-connection (lsp-stdio-connection '("bumi-lsp"))
:activation-fn (lsp-activate-on "html" "javascriptreact" "typescriptreact" "vue")
:server-id 'bumi))
(add-hook 'html-mode-hook #'lsp)
(add-hook 'web-mode-hook #'lsp)Configuration
The server accepts configuration via the bumi namespace:
{
"bumi": {
"enabled": true,
"wcag": {
"version": "2.2",
"level": "AA"
},
"rules": {
"disabled": []
}
}
}Settings
| Setting | Type | Default | Description |
|---|---|---|---|
bumi.enabled |
boolean | true |
Enable/disable the linter |
bumi.wcag.version |
string | "2.2" |
WCAG version: "2.0", "2.1", or "2.2" |
bumi.wcag.level |
string | "AA" |
Conformance level: "A", "AA", or "AAA" |
bumi.rules.disabled |
array | [] |
List of rule IDs to disable |
Rules
The server includes 19 accessibility rules:
| Rule ID | WCAG | Level | Version | Description |
|---|---|---|---|---|
| IMG_MISSING_ALT | 1.1.1 | A | 2.0 | Image missing alt attribute |
| IMG_SUSPICIOUS_ALT | 1.1.1 | A | 2.0 | Suspicious alt text patterns |
| BUTTON_NO_NAME | 4.1.2 | A | 2.0 | Button without accessible name |
| LINK_EMPTY | 2.4.4 | A | 2.0 | Empty link element |
| LINK_GENERIC_TEXT | 2.4.4 | A | 2.0 | Generic link text |
| INPUT_MISSING_LABEL | 1.3.1, 3.3.2 | A | 2.0 | Form input missing label |
| HEADING_EMPTY | 1.3.1, 2.4.6 | A | 2.0 | Empty heading element |
| HEADING_SKIP_LEVEL | 1.3.1 | A | 2.0 | Skipped heading level |
| HTML_MISSING_LANG | 3.1.1 | A | 2.0 | Missing lang attribute |
| ARIA_INVALID_ROLE | 4.1.2 | A | 2.0 | Invalid ARIA role |
| ARIA_HIDDEN_FOCUSABLE | 4.1.2 | A | 2.0 | Focusable element with aria-hidden |
| TABINDEX_POSITIVE | 2.4.3 | A | 2.0 | Positive tabindex value |
| AUTOCOMPLETE_MISSING | 1.3.5 | AA | 2.1 | Missing autocomplete attribute |
| FORM_NO_SUBMIT | 2.1.1 | A | 2.0 | Form without submit button |
| TABLE_MISSING_HEADERS | 1.3.1 | A | 2.0 | Table missing headers |
| IFRAME_MISSING_TITLE | 2.4.1, 4.1.2 | A | 2.0 | Iframe missing title |
| VIDEO_MISSING_CAPTIONS | 1.2.2 | A | 2.0 | Video without captions track |
| AUDIO_MISSING_CONTROLS | 1.4.2 | A | 2.0 | Audio without controls |
| TARGET_SIZE_MINIMUM | 2.5.8 | AA | 2.2 | Target size may be too small |
Quick Fixes
The server provides automatic quick fixes for:
- Adding
alt=""to images - Adding
aria-labelto empty buttons - Changing positive
tabindextotabindex="0" - Adding
titleto iframes - Adding
controlsto audio elements
Completions
The server provides completions for:
- ARIA roles (
role="button",role="navigation", etc.) - ARIA attributes (
aria-label,aria-labelledby, etc.) - Common accessibility attributes (
alt,tabindex, etc.)
Troubleshooting
Server not starting
- Ensure Node.js 18+ is installed
- Check the server path is correct
- Verify the server is executable:
chmod +x dist/server.js
No diagnostics appearing
- Check the file type is supported
- Verify LSP4IJ plugin is installed (JetBrains)
- Check server logs for errors
JetBrains specific issues
- Ensure LSP4IJ plugin is updated to latest version
- Restart the IDE after configuration changes
- Check Help > Show Log in Finder/Explorer for errors
Contributing
Contributions are welcome! Please see our GitHub repository for guidelines.
License
MIT License - Copyright (c) 2026 Flat Electronics Canada Limited