A Chrome extension that helps you identify and inspect all images with filled alt attributes on web pages. This tool is particularly useful for web developers, accessibility auditors, and content creators who want to ensure proper alt text implementation.
- Direct Page Highlighting: Highlights images with alt attributes directly on the webpage
- Toggle Functionality: Click the extension icon to turn highlights on/off
- Visual Feedback: Green borders and shadows around images with alt text
- Count Badge: Shows the total number of images with alt attributes found
- Tooltip Information: Hover over highlighted images to see their alt text
- Cross-page Support: Works on any website you visit
- No Popup Required: Simple click-to-toggle operation
- Clone or Download this repository to your local machine
- Install Dependencies:
npm install - Build the Extension:
npm run build - Open Chrome and navigate to
chrome://extensions/ - Enable Developer Mode by toggling the switch in the top-right corner
- Click "Load Unpacked" and select the
dist/folder - Pin the Extension to your toolbar for easy access
If the dist/ folder exists and contains compiled files:
- Follow steps 4-7 from Method 1 above
- Note: Run
npm run buildfirst ifdist/folder is missing
The extension will be available on the Chrome Web Store once published.
- Navigate to any webpage you want to inspect
- Click the Alt Attribute Inspector extension icon in your toolbar
- Images with alt attributes will be highlighted with green borders and shadows
- Hover over highlighted images to see their alt text in tooltips
- Click the extension icon again to turn off the highlights
- The extension badge shows "ON" when highlights are active
A demo page is included (demo.html) that contains:
- 9 images with good alt attributes (should appear in results)
- 3 images without alt attributes (should NOT appear in results)
- Various alt text styles and lengths
- Different image attributes (title, class, id, data-src)
Expected Results: When scanning the demo page, you should see exactly 9 images listed.
The extension identifies images that have:
altattribute with non-empty content- Various image source formats (src, data-src, lazy loading, etc.)
- Different image types (img tags, picture elements, role="img" elements)
- Manifest Version: 3 (Latest Chrome extension standard)
- Permissions:
activeTab: Access to current tab contentscripting: Execute content scripts for scanning
- Content Scripts: Automatically injected into web pages
- TypeScript: Written in TypeScript for better code quality
alt-plugin-chrome/
├── src/ # TypeScript source files
│ ├── background.ts # Background script
│ └── content.ts # Content script
├── dist/ # Compiled extension (generated)
│ ├── background.js # Compiled background script
│ ├── content.js # Compiled content script
│ ├── manifest.json # Extension configuration
│ └── icons/ # Extension icons
├── icons/ # Source icons
│ ├── icon16.png # 16x16 icon
│ ├── icon48.png # 48x48 icon
│ └── icon128.png # 128x128 icon
├── store-assets/ # Chrome Web Store assets
├── build.js # Main build script
├── build-store.js # Store packaging script
├── manifest.json # Source manifest
├── tsconfig.json # TypeScript configuration
└── README.md # This file
- Chrome browser (version 88+)
- Basic knowledge of Chrome extensions
- Modify
popup.cssto change the visual appearance - Update
content.jsto add more scanning capabilities - Adjust
manifest.jsonfor additional permissions or features
The extension uses automated build scripts written in TypeScript. To build and develop:
Available Commands:
npm run build- Compile TypeScript and prepare extensionnpm run dev- Build and show success messagenpm run store- Create Chrome Web Store packagenpm run clean- Remove compiled filesnpm run clean:all- Remove all generated files
Development Workflow:
- Make changes to TypeScript files in
src/ - Run
npm run buildto compile - Reload extension in Chrome (
chrome://extensions/) - Test your changes
- Ensure Developer Mode is enabled in Chrome extensions
- Check that the extension is loaded and pinned to toolbar
- Verify the webpage has images with alt attributes
- Some websites may use JavaScript to load images dynamically
- Try refreshing the page and scanning again
- Check if the page actually contains images with alt attributes
- The extension only needs access to the current tab
- No personal data is collected or transmitted
- All processing happens locally in your browser
Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.
This project is open source and available under the MIT License.
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Review the Chrome DevTools console for error messages
- Submit an issue on the project repository
- v1.0.0: Initial release with basic alt attribute scanning functionality
Note: This extension is designed for educational and development purposes. Always respect website terms of service and privacy policies when using web inspection tools.