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.
Opens WPIDE on
Code
// 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 add this snippet
- Install WPIDE on your WordPress site (it is free) and open Code Snippets.
- Use snippet above adds it from the library in one click. Or copy the code into a new snippet with the same code type.
- It is added inactive: review the code and settings, then switch it on.