New:Socket for Asana Is Now Available.Learn more
Get Started

@wcagc/source-tag

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wcagc/source-tag

Deterministic JSX source attributes for wcagc browser checks

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
7
-56.25%
Maintainers
1
Weekly downloads
 
Created
Source

@wcagc/source-tag

A zero-runtime Vite plugin that adds deterministic data-wcagc-src="relative/file.tsx:line:column" attributes to lowercase JSX host elements. The wcagc browser extension can display those build facts without guessing a source file.

Source, tests, and CI are published at WCAG-Compliance/wcagc-source-tag under the MIT license.

import { defineConfig } from "vite";
import sourceTag from "@wcagc/source-tag";

export default defineConfig({ plugins: [sourceTag()] });

The plugin applies only to Vite's development server by default. For a controlled staging build, use sourceTag({ includeInBuild: true }). This exposes relative repository paths in rendered markup; assess that disclosure before enabling it. root, include, exclude, and attribute can be customized. Generated maps use only the validated relative source path and do not embed source content. No absolute path is emitted and no runtime code is added.

FAQs

Package last updated on 03 Aug 2026

Related posts