Auto-Alt & Auto-Title (A11y + SEO) for Sngine

by JaneMarcia

FREE
0.0 (0)
Auto-Alt & Auto-Title (A11y + SEO) for Sngine

About This Addon

Auto-Alt & Auto-Title for Sngine is a zero-server-load accessibility and SEO enhancer that automatically adds missing alt & title attributes to images, ARIA labels to background images, smart titles to links, and fixes page headings (H2/H3 β†’ H1) for proper SEOβ€”working instantly on static and AJAX-loaded content without changing your theme.

To learn how to install, open the Installation Tab ☝️

Key Features

Automatically adds ALT text to all images
Automatically adds TITLE attributes to all images
Smart detection for avatars, covers, blogs, posts, products, pages, groups, events
Context-aware text generation using nearby names and titles
Properly skips decorative/icons for WCAG compliance
Adds ARIA labels to all CSS background images
Assigns role="img" for screen readers on background images
Automatically adds TITLE attributes to all links
Smart link titles for profiles, blogs, posts, pages, groups, events, and products
Preserves existing meaningful link titles
Converts H2 page titles to H1 while keeping the same visual styling
Converts H3 blog titles to H1 while keeping the same visual styling
Ensures one H1 per page (Google SEO requirement)
Works on blog listings and blog post views
Works on Pages, Groups, Events, Forums, Market, Jobs, Courses, Games, Movies, Contact pages
Supports AJAX-loaded content (infinite scroll, dynamic feeds)
Uses MutationObserver for real-time processing
Zero server load (100% client-side)
No database changes required
No theme modification required
Lightweight and fast execution
Fully WCAG-friendly accessibility behavior
Improves SEO, accessibility, and usability automatically
Safe to enable/disable instantly via one script include
Sign in to leave a review
No reviews yet

Be the first to share your experience!

Support Forum Not Available

This addon doesn't have a dedicated support forum.

Contact Developer
Installation Guide

How to Install Auto-Alt & Auto-Title (A11y + SEO) for Sngine

Step-by-step installation instructions for Auto-Alt & Auto-Title (A11y + SEO) for Sngine

πŸ“¦ STEP 1: Upload the JavaScript File

Upload auto-alt.js to:

/includes/assets/js/core/auto-alt.js

πŸ“ STEP 2: Edit Your Footer Template

Open: content/themes/default/templates/_footer.tpl

Add this line BEFORE the closing tag:

<script src="{$system['system_url']}/includes/assets/js/core/auto-alt.js"></script>

βœ… STEP 3: Clear Cache (if you use caching)

If you have caching enabled, clear it.

πŸ§ͺ STEP 4: Test

Test Images:

  1. Visit any page on your site
  2. Right-click an image
  3. Inspect element
  4. Look for the alt="..." attribute

Test Background Images:

  1. Right-click a blog thumbnail or profile picture div
  2. Inspect element
  3. Look for role="img" and aria-label="..."

Test Links:

  1. Hover over any link
  2. You should see a tooltip with the title
  3. Or inspect and look for title="..."

Test H2/H3 to H1 Conversion (SEO):

  1. Test listing pages (H2 β†’ H1):
    • Visit /blogs or /pages or /groups
    • Right-click the page title (e.g., "Blogs")
    • Inspect elementShould see:
  2. Test blog post view (H3 β†’ H1):
    • Visit any individual blog post (e.g., /blogs/123/my-blog-title)
    • Right-click the blog post title
    • Inspect element

  3. Visual styling stays the same!

🎯 What It Does

Automatically adds alt and title attributes:

Image Type Alt Text Example
User avatar (with name) John's profile picture
User avatar (no name) User profile picture
Cover photo (with name) Jane's cover photo
Cover photo (no name) Cover photo
Blog image (with title) Image from: My Blog Title
Blog image (no title) Blog post image
Post photo Shared photo
Product image Product image
Page/Group logo ScriptsTribe logo
Icons/Decorative (empty - proper accessibility)
Generic fallback Image

βœ… Background Images (background-image:url())

Adds role="img" and aria-label for screen readers:

  • Blog thumbnails in listings
  • Profile pictures in divs
  • Cover photos in divs
  • All CSS background images

Adds title attributes to ALL links:

  • Uses link text if available
  • Smart context detection (profile, blog, post, etc.)
  • Examples:
    • Profile link: Visit John's profile
    • Blog link: Read: My Blog Title
    • Post link: View post
    • Page link: Visit ScriptsTribe

βœ… SEO: H2/H3 to H1 Conversion

Automatically converts page headers for proper SEO:

  • Page titles (H2) become h1
  • Blog post titles (H3) become h1
  • Keeps same styling (with class="h2" or class="mb10 h3")
  • Only converts the main page/content title
  • Works for:
    • Listing pages: Blogs, Pages, Groups, Events, Forums, Market, Jobs, Courses, Offers, Games, Movies, Contact Us
    • Blog view pages: Individual blog post titles
  • Each page should have ONE H1 (Google requirement)

🎨 Customization

To change the fallback text, edit auto-alt.js lines 12-27:

fallbacks: {
      avatar: {
        withName: "{name}'s profile picture",
        default: "User profile picture"
      },
      cover: {
        withName: "{name}'s cover photo",
        default: "Cover photo"
      },
      blog: {
        withTitle: "Image from: {title}",
        default: "Blog post image"
      },
      post: "Shared photo",
      product: "Product image",
      pageAvatar: "{name} logo",
      groupAvatar: "{name} logo",
      eventCover: "Event cover image",
      decorative: "", // Empty for accessibility
      generic: "Image"
    },
    linkFallbacks: {
      profile: "Visit {name}'s profile",
      blog: "Read: {title}",
      post: "View post",
      page: "Visit {name}",
      group: "Visit {name}",
      event: "View event: {name}",
      product: "View product",
      generic: "Click to view"

⚑ Performance

Zero server load - runs in browser onlyCached file - loads once, used everywhereFast execution - processes 100+ images/links in ~10-15msSmart detection - uses context clues from HTMLAccessibility compliant - follows WCAG guidelinesSEO optimized - converts H2 page titles to H1 for better Google ranking


πŸ”§ Troubleshooting

Q: Images still have no alt text?

  • Check browser console for errors
  • Verify the file path is correct
  • Clear browser cache
  • Make sure you added the line to _footer.tpl

Q: Background images (in divs) have no accessibility?

  • Right-click β†’ Inspect
  • Look for role="img" and aria-label="..."
  • These are for screen readers, not visible

Q: Links don't have titles?

  • Hover over a link to see the tooltip
  • Or right-click β†’ Inspect β†’ look for title="..."

Q: Can I disable it temporarily?

Just comment out the line in _footer.tpl:

Q: Does it work with AJAX-loaded content?

Yes! It uses MutationObserver to detect new images/links.

Q: How do I check if it's working?

  • Open browser console (F12)
  • Type: document.querySelectorAll('img[alt]').length
  • Should show number of images with alt text
  • Before script: lower number
  • After script: higher number

πŸ“§ Support

Built for Sngine by ScriptsTribe
Questions? Join our Facebook group or visit scriptstribe.com


πŸ“„ License

Free & Open Source

Created by ScriptsTribe for the Sngine community.
Use, modify, and share freely.

Refund Policy
Refund Policy for Digital Downloads
1.1 Non-Refundable Items
All digital downloads are non-refundable once they have been downloaded or accessed. This policy exists because digital products are intangible and cannot be returned.
1.2 Refund Eligibility
Refunds for digital downloads may only be issued if:
  • The product was not delivered to your account or email within the promised time.
  • The product is defective or does not function as described, you requested support, and did not receive support.
  • Support could not help you with your issue.
  • Refund requests are made within 7 days of purchase, provided the product has not been downloaded.
1.3 Proof of Issue Required
To process a refund for defective products, you must provide:
  • Proof of purchase (Order ID, receipt, or confirmation email).
  • Evidence of the issue (screenshots, error logs, or other relevant details).
  • Evidence that support could not or did not help you.

Refund Policy for Addons & Custom Services
2.1 Addons
Refunds for addons follow the same rules as digital downloads: they are non-refundable after download.
2.2 Custom Services
Refunds for custom services (e.g., installation, customization, or consulting) are only available if:
  • The service was not initiated within the agreed timeframe.
  • We are unable to deliver the service as per the agreement.
  • Refund requests are made before significant progress is made on the service.
Important
  • Refunds are handled between the seller and the buyer. ScriptsTribe is a marketplace platform and is not responsible or liable for disputes, refunds, or outcomes.
  • Filing a PayPal dispute/chargeback without attempting a proper resolution with the addon seller may result in account deletion and you may lose access to re-download the addon(s).
More from JaneMarcia
Blog RSS Feed
Blog RSS Feed

This is a simple blog RSS php file. Create a folder in your root names RSS...

FREE 0.0
Community Stats
Community Stats

hey guys, made this little stats carousel widget + forum stats block for your...

FREE 0.0
Money Bear Gift Pack
Money Bear Gift Pack

This cute money bear gift pack is AI generated and copyright free. You can...

$1.00 5.0
Affiliated Games for Sngine
Affiliated Games for Sngine

Compatible with Xngine and Elengine Transform Your Sngine Site into a...

$25.00 5.0