Socket
Socket
Sign inDemoInstall

accesslint-core

Package Overview
Dependencies
2
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

accesslint-core


Version published
Weekly downloads
1
decreased by-50%
Maintainers
3
Install size
13.5 MB
Created
Weekly downloads
 

Readme

Source

AccessLint Core

A node module and CLI to scan HTML content for common accessibility issues.

Usage

Import

npm install accesslint-core
import scan from "accesslint-core";
scan("<img src='' />").catch(issues => console.log(issues));

CLI / bin command

$ accesslint --html "<img src='' />"

Outputs to stdout:

[
  {
    "location": {
      "startLine": 1,
      "startCol": 1,
      "startOffset": 0,
      "endLine": 1,
      "endCol": 15,
      "endOffset": 14,
      "attrs": {
        "src": {
          "startLine": 1,
          "startCol": 6,
          "startOffset": 5,
          "endLine": 1,
          "endCol": 12,
          "endOffset": 11
        }
      },
      "startTag": {
        "startLine": 1,
        "startCol": 1,
        "startOffset": 0,
        "endLine": 1,
        "endCol": 15,
        "endOffset": 14,
        "attrs": {
          "src": {
            "startLine": 1,
            "startCol": 6,
            "startOffset": 5,
            "endLine": 1,
            "endCol": 12,
            "endOffset": 11
          }
        }
      }
    },
    "type": "image-alt"
  }
]

Rules

  • Blank labels for form elements.
  • Missing text alternatives for images.
  • Valid aria attributes.
  • Correct tabindex values.

Keywords

FAQs

Last updated on 08 May 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc