Skip to content

Commit e7e0bac

Browse files
authored
Add ARIA attributes to alerts and status messages (#35)
1 parent 9dbe6dd commit e7e0bac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

inc/class-admin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public function addMenu() {
5959
*/
6060
public function printMenu() {
6161
if ( $this->saveOptions() ) {
62-
echo '<div id="message" class="updated notice is-dismissible"><p>' . __( 'Settings saved.' ) . '</p></div>';
62+
echo '<div id="message" role="status" class="updated notice is-dismissible"><p>' . __( 'Settings saved.' ) . '</p></div>';
6363
}
6464
$html = blade()->render(
6565
'admin', [

inc/class-cas.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public function __construct( Admin $admin ) {
9494
if ( 'pb_cas_admin' !== @$_REQUEST['page'] ) { // @codingStandardsIgnoreLine
9595
add_action(
9696
'network_admin_notices', function () {
97-
echo '<div id="message" class="error fade"><p>' . __( 'CAS is not configured.', 'pressbooks-cas-sso' ) . '</p></div>';
97+
echo '<div id="message" role="alert" class="error fade"><p>' . __( 'CAS is not configured.', 'pressbooks-cas-sso' ) . '</p></div>';
9898
}
9999
);
100100
}

pressbooks-cas-sso.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
if ( ! function_exists( 'pb_meets_minimum_requirements' ) && ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) { // @codingStandardsIgnoreLine
2020
add_action(
2121
'admin_notices', function () {
22-
echo '<div id="message" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'pressbooks-cas-sso' ) . '</p></div>';
22+
echo '<div id="message" role="alert" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'pressbooks-cas-sso' ) . '</p></div>';
2323
}
2424
);
2525
return;

0 commit comments

Comments
 (0)