Socket
Socket
Sign inDemoInstall

@double-great/alt-text

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@double-great/alt-text

Check for common issues found in alt text and suggests improvements to improve accessibility.


Version published
Weekly downloads
280
decreased by-10.83%
Maintainers
2
Weekly downloads
 
Created
Source

alt-text Build Status

Alt text describes an image. This description provides context for people with low or no vision. The text is a fallback for users with images turned off or when an image fails to load.

The usefulness of alt text can be subjective. Context, detail, length, and relevance contribute to the quality of the description. Determining alt text quality is a manual effort, but there are patterns to avoid.

altText checks for common issues found in alt text and suggests improvements.

Are you writing in markdown? We recommend using remark-lint-alt-text.

Install

npm install @double-great/alt-text

Usage

If altText detects an issue, it will return a warning to help you fix it. If altText doesn't detect any issues it will return undefined.

const altText = require("@double-great/alt-text");

console.log(altText("A child holding a photograph."));
// undefined

console.log(altText("A screenshot of a dog"));
// Alt text should not contain "screenshot of". Alt text should end in a period.

References

FAQs

Package last updated on 11 Jan 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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc