# Accessibility Statement Shortcode

> Adds an [accessibility_statement] shortcode that prints a ready-made accessibility statement with your site name, target standard, contact email and review date.

- Type: PHP
- Runs: Frontend only
- Category: [Accessibility](https://wpide.com/library/category/accessibility/)
- Tags: statement, shortcode, compliance
- Author: WPIDE Team
- Installs: 0
- Updated: 2026-10-28
- Page: https://wpide.com/library/a11y-statement-shortcode/

## Code

```php
// Values used in the statement.
$wpide_statement = array(
    'standard' => 'WCAG 2.2 level AA',
    'email'    => get_option( 'admin_email' ),
    'reviewed' => '2026-01-15', // Date of your last review (YYYY-MM-DD).
    'known'    => array( 'Some older PDF documents are not fully accessible.' ),
);

add_shortcode( 'accessibility_statement', function () use ( $wpide_statement ) {
    $site = get_bloginfo( 'name' );
    $html = '<section class="wpide-a11y-statement">';
    $html .= '<p>' . esc_html( sprintf( '%s wants everyone to be able to use this website, including people with disabilities. We aim to meet %s.', $site, $wpide_statement['standard'] ) ) . '</p>';

    if ( $wpide_statement['known'] ) {
        $html .= '<h2>Known limitations</h2><ul>';
        foreach ( $wpide_statement['known'] as $item ) {
            $html .= '<li>' . esc_html( $item ) . '</li>';
        }
        $html .= '</ul>';
    }

    $html .= '<h2>Feedback</h2><p>' . esc_html( 'If you find a barrier on this site, please tell us and we will do our best to fix it:' ) . ' <a href="' . esc_url( 'mailto:' . antispambot( $wpide_statement['email'] ) ) . '">' . esc_html( antispambot( $wpide_statement['email'] ) ) . '</a></p>';
    $html .= '<p>' . esc_html( sprintf( 'This statement was last reviewed on %s.', date_i18n( get_option( 'date_format' ), strtotime( $wpide_statement['reviewed'] ) ) ) ) . '</p>';

    return $html . '</section>';
} );
```

## Notes

Edit the values at the top, then review the text with whoever is responsible for accessibility on your site; this is a starting point, not legal advice.

## How to use it

Install the free WPIDE plugin (https://wordpress.org/plugins/wpide/), find "Accessibility Statement Shortcode" 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/
