Skip to content

Code Tutorials

Practical WordPress, React, JavaScript, CSS, accessibility and web performance tutorials by Ali Shahroodi.

Accessibility: Using ARIA roles

An introduction to ARIA (Accessible Rich Internet Applications) roles and how to use them to make your web applications more accessible to users with disabilities.

Read Tutorial

JS: Lazy Loading Images

Improve page load times by implementing native lazy loading for images and using Intersection Observer as a fallback for older browsers. A simple trick for a big performance win.

Read Tutorial

JS: A Simple Debounce Function

Learn how to implement a debounce function from scratch in JavaScript. This utility is essential for improving performance by limiting the rate at which a function gets called.

Read Tutorial

CSS: Modern Centering Techniques

Explore the best ways to center elements in CSS using Flexbox, Grid, and other modern properties. Say goodbye to old hacks and write cleaner, more predictable layout code.

Read Tutorial

React: Basic Fetch Hook

A reusable custom hook in React to handle fetching data from an API, managing loading and error states cleanly and efficiently within your components.

Read Tutorial

WordPress: Add Custom Post Type

A foundational snippet for creating a new custom post type in your WordPress theme's functions.php file. This is the first step to building custom content structures.

Read Tutorial