Skip to content

Initial Release - Add aria-current="page" to all WP Blocks linking to the curren page

Latest

Choose a tag to compare

@Silver0034 Silver0034 released this 18 Nov 16:17

Add Aria Current to Links - WordPress Plugin

Version: 1.0.0
Release Date: 11/18/2024

I am excited to announce the initial release of the "Add Aria Current to Links" WordPress plugin. This plugin enhances the accessibility of your WordPress site by automatically adding the aria-current="page" attribute to all blocks that link to the current page.

Overview

Features

  • Automatic Aria Current Attribute: Automatically adds the aria-current="page" attribute to all WordPress blocks that link to the current page, improving accessibility by indicating the current page in navigation.
  • Compatibility: Compatible with WordPress 5.0.0 and above.
  • PHP Compatibility: Requires PHP 5.3.0 or higher.
  • Easy Installation: Simple installation process through the WordPress admin panel or by uploading the plugin files to an aria-current directory in the plugins folder.

How It Works

The plugin uses the render_block filter to modify the block content before it is rendered. It checks if the block contains a link to the current page and adds the aria-current="page" attribute to the link if it does.

Installation

  • Download the Plugin: Download the plugin from the GitHub Releases page.
  • Upload to WordPress: Upload the plugin files to the aria-current directory, or install the plugin directly through the WordPress plugins screen.
  • Activate the Plugin: Activate the plugin through the 'Plugins' screen in WordPress.