Skip to content

jinolacson/check_empty_alts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Check Missing Tool

Check Missing Alt Tool

The Check Missing Alt Tool is a Python-based utility designed to analyze web pages for <img> and <nuxt-img> tags that are missing or have empty alt attributes. This tool helps developers and content creators ensure their websites are accessible and SEO-friendly by identifying images that lack proper descriptions.

Key Features

  • Dynamic Base URL Input: Users can specify the base URL dynamically when running the tool, making it flexible for different environments (e.g., staging, production).
  • Image Categorization: Separates images into two categories:
    • Images with the data-nuxt-img attribute.
    • Regular <img> tags.
  • CSV Export: Generates two separate CSV files:
    • missing_data_nuxt_img.csv: Contains images with the data-nuxt-img attribute and missing alt attributes.
    • missing_regular_img.csv: Contains regular <img> tags with missing alt attributes.
  • Error Handling: Gracefully handles network errors and invalid URLs.

How It Helps

  • Accessibility: Ensures all images have meaningful alt attributes, improving the experience for users relying on screen readers.
  • SEO Optimization: Helps improve search engine rankings by ensuring images are properly described.
  • Content Quality: Identifies gaps in content descriptions, enabling teams to maintain high-quality standards.

How to Use

  1. Clone the repository and navigate to the project directory.
  2. Create a virtual environment and install the required dependencies:
    python3 -m venv venv
    source venv/bin/activate
    pip install -r requirements.txt
  3. Add your URLs to urls.json.
  4. Run the tool using the run.sh script:
    ./run.sh
  5. Enter the base URL when prompted.
  6. Review the generated CSV files for missing alt attributes.

Example Usage

(venv) root@dev:~/Downloads/check_empty_alts(main)$ ./run.sh
Select an option:
1. Run Check Missing Alt Tool
2. Run Check Semantics Tool
Enter your choice: 2
Enter the BASE_URL (e.g., https://staging-nuxt3.bywinona.com/): https://staging-nuxt3.bywinona.com/

Check Semantics Tool

The Check Semantics Tool verifies the presence of semantic HTML tags on web pages. It ensures that pages use proper semantic elements for better accessibility and SEO.

Semantic Tags Checked:

  • <main>: Main content of the page.
  • <header>: Page header.
  • <footer>: Page footer.
  • <article>: Standalone content blocks.
  • <aside>: Complementary content.
  • <nav>: Navigation links.

Features:

  • Checks for the presence of semantic tags on each page.
  • Exports results to a CSV file for easy review.

Output File:

  • semantic_check_results.csv: Contains the URLs and a boolean value for each semantic tag indicating its presence or absence.

About

A Python-based utility for Nuxt4 (Vue 3) developers to detect images with missing or empty alt attributes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors