Introduction¶
In AI agent development and knowledge base construction, document accessibility is frequently overlooked. Manually checking contrast ratios, tag semantics, alt text, and heading hierarchy page by page is both inefficient and prone to oversights. DSH (DeepSeek Harness) follows the “everything is a plugin” philosophy, allowing capabilities to be extended through plugins. This plugin integrates a static rules engine into the DSH ecosystem to scan Markdown and HTML documents for accessibility gaps.
Plugin Overview¶
- Plugin Name: @deepwhale-cn/dsh-doc-accessibility
- Maintainer: feely0208
- Core Value: Based on a static rules engine, scans documents for contrast, structured tags, alt text, and heading hierarchy issues, outputting an actionable issue list with remediation suggestions.
- Scope: Markdown and HTML documents; scan results are a list of detections—detections do not equal violations, and context-specific judgment is required.
Core Features¶
- Document Type Support: Supports both Markdown and HTML document formats.
- Scan Rules: Built-in 6 static rules, each with rationale and references:
- DA-IMG-EMPTY-ALT: Image missing alt text
- DA-IMG-FILENAME-ALT: Image alt text is the filename
- DA-HTML-IMG-NO-ALT: HTMLimgelement missingaltattribute
- DA-LINK-GENERIC: Link missing descriptive text
- DA-COLOR-ONLY: Color used as the sole means of conveying information
- DA-HTML-NO-LANG: HTML element missinglangattribute
References: GB/T 37668-2019 Information Technology — Internet Content Accessibility Technical Requirements and Test Methods, WCAG 2.1. - Output Information: Each detection includes
file:lineand a specific remediation suggestion. - Known Limitations: Contrast ratio calculation, screen reader testing, and video caption completeness require professional tools and manual review.
Installation & Activation¶
Install via the DSH command line:
dsh plugin --profile web add @deepwhale-cn/dsh-doc-accessibility
Or install via npm:
npm i @deepwhale-cn/dsh-doc-accessibility
Or install directly from this repository:
dsh plugin install ./
Typical Usage¶
- Scan a document directory:
npx @deepwhale-cn/dsh-doc-accessibility --root <doc-directory>
- View the built-in sample demo:
npx @deepwhale-cn/dsh-doc-accessibility --demo
- List all rules and references:
npx @deepwhale-cn/dsh-doc-accessibility --list-rules
- Generate an HTML report:
npx @deepwhale-cn/dsh-doc-accessibility --html r.html
Use Cases & Notes¶
- Target Audience:
- AI agent developers: Check document accessibility before building a knowledge base.
- Content operations and documentation teams: Batch-scan Markdown or HTML documents to identify common gaps.
- Cautions:
- The plugin runs with the current DSH process permissions. Review the source code and license beforehand.
- Scan results are a list of detections—detections do not equal violations. Combine business rules with WCAG/GB/T requirements for comprehensive judgment.
- More granular checks such as contrast ratios, screen reader testing, and video caption completeness require professional tools and manual review.
Summary¶
This plugin integrates a static rules engine into the DSH ecosystem, supporting accessibility gap scanning for Markdown and HTML documents. It helps developers and content teams quickly identify issues related to contrast, structured tags, alt text, and heading hierarchy. Installation and usage are straightforward, making it suitable for use as a pre-step in the knowledge base construction pipeline.
- Directory Page: https://www.skillhub.cn/plugins/feely0208/dsh-doc-accessibility
- GitHub: https://github.com/feely0208/dsh-doc-accessibility