# Accessible Wrapper for Rank Math Breadcrumbs

> Sets your own aria-label on the Rank Math breadcrumb navigation and wraps the separator so screen readers skip it.

- Type: PHP
- Runs: Frontend only
- Category: [Plugin Integrations](https://wpide.com/library/category/integrations/)
- Tags: rank-math, breadcrumbs, accessibility
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/rankmath-breadcrumb-accessible-nav/

## Code

```php
// Label announced by screen readers.
$wpide_rm_crumb_label = 'Breadcrumb';

add_filter( 'rank_math/frontend/breadcrumb/args', function ( $args ) use ( $wpide_rm_crumb_label ) {
    if ( ! is_array( $args ) ) {
        return $args;
    }

    $args['wrap_before'] = '<nav aria-label="' . esc_attr( $wpide_rm_crumb_label ) . '" class="rank-math-breadcrumb"><p>';
    $args['wrap_after']  = '</p></nav>';

    if ( isset( $args['delimiter'] ) ) {
        $args['delimiter'] = '<span class="separator" aria-hidden="true">' . wp_strip_all_tags( $args['delimiter'] ) . '</span>';
    }

    return $args;
} );
```

## Notes

Rank Math's separator setting still controls the character itself.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Accessible Wrapper for Rank Math Breadcrumbs" in its snippet library and add it in one click; or create a new PHP snippet in WPIDE (or any code snippets plugin) and paste the code above. More snippets: https://wpide.com/library/
