WP Accessibility - Version 1.5.7

Version Description

  • Remove menu role from toolbar
  • Fixed toolbar button font size adjustment
  • Updated screen reader text class to include clip-path and whitespace
  • Minor toolbar design tweaks
  • Removed WordPress admin stylesheet (obsolete)
  • Misc display fixes in settings
  • Remove 'Access Monitor' admin notice
  • Bug fix: Missing space in featured img HTML
  • Bug fix: Switch main heading to H1
Download this release

Release Info

Developer joedolson
Plugin Icon 128x128 WP Accessibility
Version 1.5.7
Comparing to
See all releases

Code changes from version 1.5.6 to 1.5.7

css/wp-admin.css DELETED
@@ -1,35 +0,0 @@
1
- /*------------------------------------------------------------------------------
2
-
3
- Custom Stylesheet provided by WP Accessibility (http://www.joedolson.com/articles/wp-accessibility/)
4
-
5
- */
6
- a:hover, a:active {
7
- color: #d54e21;
8
- text-decoration: underline !important;
9
- }
10
-
11
- a:focus {
12
- color: #124964;
13
- text-decoration: underline !important;
14
- }
15
-
16
- .next-page:focus, .next-page:hover, .last-page:focus, .last-page:hover, .prev-page:focus, .prev-page:hover, .first-page:focus, .first-page:hover {
17
- border: 1px solid #124964 !important;
18
- }
19
-
20
- .view-switch a img {
21
- border: 1px solid #fff;
22
- }
23
-
24
- .view-switch a:hover img, .view-switch a:focus img {
25
- border: 1px solid #124964 !important;
26
- border-radius: 2px;
27
- }
28
-
29
- .button-primary.hover, .button-primary:hover, .button-primary.focus, .button-primary:focus {
30
- border-color: #002 !important;
31
- }
32
-
33
- .button-secondary.hover, .button-secondary:hover, .button-secondary.focus, .button-secondary:focus, .button:hover, .button:focus {
34
- border-color: #000 !important;
35
- }
css/wpa-styles.css CHANGED
@@ -38,8 +38,14 @@ li.back {
38
.wpa-support-me a:hover, .wpa-support-me a:focus {
39
text-decoration: none;
40
background: #fff;
41
}
42
43
#wpa_settings_page ul ul {
44
margin: 1em 2em;
45
}
38
.wpa-support-me a:hover, .wpa-support-me a:focus {
39
text-decoration: none;
40
background: #fff;
41
+ color: #007eb3;
42
+ text-shadow: none;
43
}
44
45
#wpa_settings_page ul ul {
46
margin: 1em 2em;
47
+ }
48
+
49
+ #wpa_settings_page .hndle, .settings_page_wp-accessibility-wp-accessibility .hndle {
50
+ cursor: auto !important;
51
}
lang/wp-accessibility-es_ES.mo DELETED
Binary file
lang/wp-accessibility-hu_HU.mo DELETED
Binary file
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://www.joedolson.com/donate/
4
Tags: title, accessibility, accessible, navigation, wcag, a11y, section508, focus, alt text, labels, aria
5
Requires at least: 3.4.2
6
Tested up to: 4.6
7
- Stable tag: 1.5.5
8
Text Domain: wp-accessibility
9
License: GPLv2 or later
10
@@ -60,6 +60,18 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
60
61
[Suggest a change!](https://github.com/joedolson/wp-accessibility/)
62
63
= 1.5.6 =
64
65
* Feature: Add support for longdesc in featured images.
4
Tags: title, accessibility, accessible, navigation, wcag, a11y, section508, focus, alt text, labels, aria
5
Requires at least: 3.4.2
6
Tested up to: 4.6
7
+ Stable tag: 1.5.6
8
Text Domain: wp-accessibility
9
License: GPLv2 or later
10
60
61
[Suggest a change!](https://github.com/joedolson/wp-accessibility/)
62
63
+ = 1.5.7 =
64
+
65
+ * Remove menu role from toolbar
66
+ * Fixed toolbar button font size adjustment
67
+ * Updated screen reader text class to include clip-path and whitespace
68
+ * Minor toolbar design tweaks
69
+ * Removed WordPress admin stylesheet (obsolete)
70
+ * Misc display fixes in settings
71
+ * Remove 'Access Monitor' admin notice
72
+ * Bug fix: Missing space in featured img HTML
73
+ * Bug fix: Switch main heading to H1
74
+
75
= 1.5.6 =
76
77
* Feature: Add support for longdesc in featured images.
toolbar/css/a11y-contrast.css CHANGED
@@ -26,6 +26,14 @@
26
body > div {
27
outline: 1px solid #fff;
28
}
29
30
a, abbr, acronym, address, article, aside, b, basefont, bdi, big,
31
blink, blockquote, body, button, canvas, caption, center, cite, code,
26
body > div {
27
outline: 1px solid #fff;
28
}
29
+
30
+ body div.a11y-toolbar {
31
+ outline: none;
32
+ }
33
+
34
+ body div.a11y-toolbar .offscreen {
35
+ outline: 1px solid #fff;
36
+ }
37
38
a, abbr, acronym, address, article, aside, b, basefont, bdi, big,
39
blink, blockquote, body, button, canvas, caption, center, cite, code,
toolbar/css/a11y.css CHANGED
@@ -95,13 +95,16 @@
95
96
.a11y-toolbar .offscreen, .a11y_stylesheet_path {
97
position: absolute !important;
98
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
99
clip: rect(1px, 1px, 1px, 1px);
100
padding: 0 !important;
101
border: 0 !important;
102
height: 1px !important;
103
width: 1px !important;
104
overflow: hidden;
105
}
106
107
/* a11y toolbar RTL */
@@ -140,14 +143,17 @@
140
141
.a11y-toolbar button:hover .offscreen, .a11y-toolbar button:focus .offscreen {
142
height: auto !important;
143
- width: 10em !important;
144
clip: unset !important;
145
color: #333;
146
- background: #ffe;
147
- padding: 3px;
148
box-shadow: 0 0 1px #000;
149
- border-radius: 3px;
150
- font-size: 14px;
151
top: 25%;
152
display: block;
153
}
95
96
.a11y-toolbar .offscreen, .a11y_stylesheet_path {
97
position: absolute !important;
98
clip: rect(1px, 1px, 1px, 1px);
99
+ clip-path: polygon(0px 0px, 0px 0px,0px 0px, 0px 0px);
100
+ white-space: nowrap;
101
padding: 0 !important;
102
border: 0 !important;
103
height: 1px !important;
104
width: 1px !important;
105
overflow: hidden;
106
+ -webkit-transition: width .3s, clip .3s, clip-path .3s, background-color .5s;
107
+ transition: width .3s, clip .3s, clip-path .3s, background-color .5s;
108
}
109
110
/* a11y toolbar RTL */
143
144
.a11y-toolbar button:hover .offscreen, .a11y-toolbar button:focus .offscreen {
145
height: auto !important;
146
+ width: 12em !important;
147
clip: unset !important;
148
+ clip-path: unset !important;
149
color: #333;
150
+ background: #ffd;
151
+ padding: 2px;
152
box-shadow: 0 0 1px #000;
153
+ border-radius: 2px;
154
+ font-size: 13px;
155
+ text-transform: none;
156
+ font-family: Arial;
157
top: 25%;
158
display: block;
159
}
wp-accessibility-settings.php CHANGED
@@ -72,7 +72,6 @@ function wpa_update_settings() {
72
$wpa_focus = ( isset( $_POST['wpa_focus'] ) ) ? 'on' : '';
73
$wpa_focus_color = ( isset( $_POST['wpa_focus_color'] ) ) ? str_replace( '#', '', $_POST['wpa_focus_color'] ) : '';
74
$wpa_continue = ( isset( $_POST['wpa_continue'] ) ) ? $_POST['wpa_continue'] : 'Continue Reading';
75
- $wpa_admin_css = ( isset( $_POST['wpa_admin_css'] ) ) ? 'on' : '';
76
$wpa_row_actions = ( isset( $_POST['wpa_row_actions'] ) ) ? 'on' : '';
77
$wpa_diagnostics = ( isset( $_POST['wpa_diagnostics'] ) ) ? 'on' : '';
78
$wpa_insert_roles = ( isset( $_POST['wpa_insert_roles'] ) ) ? 'on' : '';
@@ -90,7 +89,6 @@ function wpa_update_settings() {
90
update_option( 'wpa_focus', $wpa_focus );
91
update_option( 'wpa_focus_color', $wpa_focus_color );
92
update_option( 'wpa_continue', $wpa_continue );
93
- update_option( 'wpa_admin_css', $wpa_admin_css );
94
update_option( 'wpa_row_actions', $wpa_row_actions );
95
update_option( 'wpa_diagnostics', $wpa_diagnostics );
96
update_option( 'wpa_insert_roles', $wpa_insert_roles );
@@ -133,13 +131,13 @@ function wpa_update_settings() {
133
function wpa_admin_menu() {
134
echo wpa_update_settings(); ?>
135
<div class="wrap">
136
- <h2><?php _e( 'WP Accessibility: Settings', 'wp-accessibility' ); ?></h2>
137
138
<div id="wpa_settings_page" class="postbox-container" style="width: 70%">
139
<div class="metabox-holder">
140
<div class="ui-sortable meta-box-sortables">
141
<div class="postbox">
142
- <h3><?php _e( 'Add Skiplinks', 'wp-accessibility' ); ?></h3>
143
144
<div class="inside">
145
<?php if ( wpa_accessible_theme() && get_option( 'asl_enable' ) != 'on' ) { ?>
@@ -214,7 +212,7 @@ function wpa_admin_menu() {
214
</div>
215
</div>
216
<div class="postbox">
217
- <h3 id="toolbar"><?php _e( 'Accessibility Toolbar Settings', 'wp-accessibility' ); ?></h3>
218
<div class="inside">
219
<form method="post" action="<?php echo admin_url( 'options-general.php?page=wp-accessibility/wp-accessibility.php' ); ?>">
220
<ul>
@@ -300,7 +298,7 @@ function wpa_admin_menu() {
300
</div>
301
</div>
302
<div class="postbox">
303
- <h3 id="contrast"><?php _e( 'Miscellaneous Accessibility Settings', 'wp-accessibility' ); ?></h3>
304
305
<div class="inside">
306
<form method="post" action="<?php echo admin_url( 'options-general.php?page=wp-accessibility/wp-accessibility.php' ); ?>">
@@ -379,12 +377,6 @@ function wpa_admin_menu() {
379
} ?>/> <label
380
for="wpa_longdesc_featured"><?php _e( 'Support <code>longdesc</code> on featured images', 'wp-accessibility' ); ?></label>
381
</li>
382
- <li><input type="checkbox" id="wpa_admin_css"
383
- name="wpa_admin_css" <?php if ( get_option( 'wpa_admin_css' ) == "on" ) {
384
- echo 'checked="checked" ';
385
- } ?>/> <label
386
- for="wpa_admin_css"><?php _e( 'Enable WordPress Admin stylesheet', 'wp-accessibility' ); ?></label>
387
- </li>
388
<li><input type="checkbox" id="wpa_row_actions"
389
name="wpa_row_actions" <?php if ( get_option( 'wpa_row_actions' ) == "on" ) {
390
echo 'checked="checked" ';
@@ -424,7 +416,7 @@ function wpa_admin_menu() {
424
</div>
425
</div>
426
<div class="postbox">
427
- <h3><?php _e( 'Remove Title Attributes', 'wp-accessibility' ); ?></h3>
428
429
<div class="inside">
430
<?php wpa_accessible_theme(); ?>
@@ -512,7 +504,7 @@ function wpa_admin_menu() {
512
</div>
513
</div>
514
<div class="postbox">
515
- <h3><?php _e( 'Color Contrast Tester', 'wp-accessibility' ); ?></h3>
516
517
<div class="inside">
518
<?php
@@ -586,7 +578,7 @@ function wpa_admin_menu() {
586
</div>
587
</div>
588
<div class="postbox" id="get-support">
589
- <h3><?php _e( 'Get Plug-in Support', 'wp-accessibility' ); ?></h3>
590
591
<div class="inside">
592
<div class='wpa-support-me'>
@@ -607,7 +599,7 @@ function wpa_admin_menu() {
607
<div class="metabox-holder">
608
<div class="ui-sortable meta-box-sortables">
609
<div class="postbox">
610
- <h3><?php _e( 'Support this Plugin', 'wp-accessibility' ); ?></h3>
611
612
<div class="inside">
613
<p>
@@ -641,37 +633,29 @@ function wpa_admin_menu() {
641
</div>
642
</div>
643
</div>
644
-
645
<div class="ui-sortable meta-box-sortables">
646
<div class="postbox">
647
- <h3><?php _e( 'Accessibility References', 'wp-accessibility' ); ?></h3>
648
649
<div class="inside">
650
- <ul>
651
- <li><a href="http://make.wordpress.org/accessibility/">Make WordPress: Accessibility</a></li>
652
- <li><a href="https://make.wordpress.org/themes/handbook/review/accessibility/">WordPress Theme Accessibility Guidelines</a></li>
653
- <li><a href="http://make.wordpress.org/support/user-manual/web-publishing/accessibility/">WordPress
654
- User Manual: Accessibility</a></li>
655
- <li><a href="https://www.joedolson.com/tools/color-contrast.php">Test Color Contrast</a></li>
656
- <li><a href="http://wave.webaim.org/">WAVE: Web accessibility evaluation tool</a></li>
657
- </ul>
658
</div>
659
</div>
660
</div>
661
-
662
<div class="ui-sortable meta-box-sortables">
663
<div class="postbox">
664
- <h3><?php _e( 'Contributing References', 'wp-accessibility' ); ?></h3>
665
666
<div class="inside">
667
<ul>
668
- <li><a href="http://www.accessibleculture.org/articles/2010/08/continue-reading-links-in-wordpress/">Continue Reading Links in WordPress</a></li>
669
- <li><a href="http://www.mothereffingtoolconfuser.com">Mother Effing Tool Confuser</a></li>
670
- <li><a href="http://wordpress.org/extend/plugins/remove-title-attributes/">Remove Title Attributes</a></li>
671
- <li><a href="http://accessites.org/site/2008/11/wordpress-and-accessibility/#comment-2926">WordPress and Accessibility (Comment)</a></li>
672
- <li><a href="http://wordpress.org/extend/plugins/img-title-removal/">IMG Title Removal</a></li>
673
- <li><a href="https://github.com/clrux/a11y">Accessibility Toolbar</a></li>
674
- <li><a href="https://wordpress.org/plugins/long-description-for-image-attachments/">WordPress Long Description</a></li>
675
</ul>
676
</div>
677
</div>
@@ -679,11 +663,14 @@ function wpa_admin_menu() {
679
680
<div class="ui-sortable meta-box-sortables">
681
<div class="postbox">
682
- <h3><?php _e( 'Customization Notes', 'wp-accessibility' ); ?></h3>
683
684
<div class="inside">
685
<p>
686
- <?php _e( 'It is almost impossible for the Accessibility Toolbar to guarantee a good result for large text or high contrast modes. Author your own high-contrast styles by placing a stylesheet called <code>a11y-contrast.css</code> in your Theme\'s stylesheet directory.', 'wp-accessibility' ); ?>
687
</p>
688
689
<p>
@@ -704,7 +691,7 @@ function wpa_admin_menu() {
704
<?php if ( wpa_accessible_theme() ) { ?>
705
<div class="ui-sortable meta-box-sortables">
706
<div class="postbox">
707
- <h3><?php _e( 'Your Theme', 'wp-accessibility' ); ?></h3>
708
709
<div class="inside">
710
<p>
@@ -718,6 +705,26 @@ function wpa_admin_menu() {
718
</div>
719
<?php } ?>
720
721
</div>
722
</div>
723
72
$wpa_focus = ( isset( $_POST['wpa_focus'] ) ) ? 'on' : '';
73
$wpa_focus_color = ( isset( $_POST['wpa_focus_color'] ) ) ? str_replace( '#', '', $_POST['wpa_focus_color'] ) : '';
74
$wpa_continue = ( isset( $_POST['wpa_continue'] ) ) ? $_POST['wpa_continue'] : 'Continue Reading';
75
$wpa_row_actions = ( isset( $_POST['wpa_row_actions'] ) ) ? 'on' : '';
76
$wpa_diagnostics = ( isset( $_POST['wpa_diagnostics'] ) ) ? 'on' : '';
77
$wpa_insert_roles = ( isset( $_POST['wpa_insert_roles'] ) ) ? 'on' : '';
89
update_option( 'wpa_focus', $wpa_focus );
90
update_option( 'wpa_focus_color', $wpa_focus_color );
91
update_option( 'wpa_continue', $wpa_continue );
92
update_option( 'wpa_row_actions', $wpa_row_actions );
93
update_option( 'wpa_diagnostics', $wpa_diagnostics );
94
update_option( 'wpa_insert_roles', $wpa_insert_roles );
131
function wpa_admin_menu() {
132
echo wpa_update_settings(); ?>
133
<div class="wrap">
134
+ <h1><?php _e( 'WP Accessibility: Settings', 'wp-accessibility' ); ?></h1>
135
136
<div id="wpa_settings_page" class="postbox-container" style="width: 70%">
137
<div class="metabox-holder">
138
<div class="ui-sortable meta-box-sortables">
139
<div class="postbox">
140
+ <h2 class='hndle'><?php _e( 'Add Skiplinks', 'wp-accessibility' ); ?></h2>
141
142
<div class="inside">
143
<?php if ( wpa_accessible_theme() && get_option( 'asl_enable' ) != 'on' ) { ?>
212
</div>
213
</div>
214
<div class="postbox">
215
+ <h2 id="toolbar" class='hndle'><?php _e( 'Accessibility Toolbar Settings', 'wp-accessibility' ); ?></h2>
216
<div class="inside">
217
<form method="post" action="<?php echo admin_url( 'options-general.php?page=wp-accessibility/wp-accessibility.php' ); ?>">
218
<ul>
298
</div>
299
</div>
300
<div class="postbox">
301
+ <h2 id="contrast" class='hndle'><?php _e( 'Miscellaneous Accessibility Settings', 'wp-accessibility' ); ?></h2>
302
303
<div class="inside">
304
<form method="post" action="<?php echo admin_url( 'options-general.php?page=wp-accessibility/wp-accessibility.php' ); ?>">
377
} ?>/> <label
378
for="wpa_longdesc_featured"><?php _e( 'Support <code>longdesc</code> on featured images', 'wp-accessibility' ); ?></label>
379
</li>
380
<li><input type="checkbox" id="wpa_row_actions"
381
name="wpa_row_actions" <?php if ( get_option( 'wpa_row_actions' ) == "on" ) {
382
echo 'checked="checked" ';
416
</div>
417
</div>
418
<div class="postbox">
419
+ <h2 class='hndle'><?php _e( 'Remove Title Attributes', 'wp-accessibility' ); ?></h2>
420
421
<div class="inside">
422
<?php wpa_accessible_theme(); ?>
504
</div>
505
</div>
506
<div class="postbox">
507
+ <h2 class='hndle'><?php _e( 'Color Contrast Tester', 'wp-accessibility' ); ?></h2>
508
509
<div class="inside">
510
<?php
578
</div>
579
</div>
580
<div class="postbox" id="get-support">
581
+ <h2 class='hndle'><?php _e( 'Get Plug-in Support', 'wp-accessibility' ); ?></h2>
582
583
<div class="inside">
584
<div class='wpa-support-me'>
599
<div class="metabox-holder">
600
<div class="ui-sortable meta-box-sortables">
601
<div class="postbox">
602
+ <h2 class='hndle'><?php _e( 'Support this Plugin', 'wp-accessibility' ); ?></h2>
603
604
<div class="inside">
605
<p>
633
</div>
634
</div>
635
</div>
636
+
637
<div class="ui-sortable meta-box-sortables">
638
<div class="postbox">
639
+ <h2 class='hndle'><?php _e( 'Access Monitor', 'wp-accessibility' ); ?></h2>
640
641
<div class="inside">
642
+ <p><?php printf( __( 'Try using <a href="%s">Access Monitor</a> to do scheduled and on-demand evaluations of your web site accessibility.', 'wp-accessibility' ), 'https://wordpress.org/plugins/access-monitor/' ) ?></p>
643
</div>
644
</div>
645
</div>
646
+
647
<div class="ui-sortable meta-box-sortables">
648
<div class="postbox">
649
+ <h2 class='hndle'><?php _e( 'Accessibility References', 'wp-accessibility' ); ?></h2>
650
651
<div class="inside">
652
<ul>
653
+ <li><a href="http://make.wordpress.org/accessibility/">Make WordPress: Accessibility</a></li>
654
+ <li><a href="https://make.wordpress.org/themes/handbook/review/accessibility/">WordPress Theme Accessibility Guidelines</a></li>
655
+ <li><a href="http://make.wordpress.org/support/user-manual/web-publishing/accessibility/">WordPress
656
+ User Manual: Accessibility</a></li>
657
+ <li><a href="https://www.joedolson.com/tools/color-contrast.php">Test Color Contrast</a></li>
658
+ <li><a href="http://wave.webaim.org/">WAVE: Web accessibility evaluation tool</a></li>
659
</ul>
660
</div>
661
</div>
663
664
<div class="ui-sortable meta-box-sortables">
665
<div class="postbox">
666
+ <h2 class='hndle'><?php _e( 'Customization Notes', 'wp-accessibility' ); ?></h2>
667
668
<div class="inside">
669
<p>
670
+ <?php _e( 'It is almost impossible for the Accessibility Toolbar to guarantee a good result for large text or high contrast modes.', 'wp-accessibility' ); ?>
671
+ </p>
672
+ <p>
673
+ <?php _e( 'Author high-contrast styles by placing a stylesheet called <code>a11y-contrast.css</code> in your Theme\'s stylesheet directory.', 'wp-accessibility' ); ?>
674
</p>
675
676
<p>
691
<?php if ( wpa_accessible_theme() ) { ?>
692
<div class="ui-sortable meta-box-sortables">
693
<div class="postbox">
694
+ <h2 class='hndle'><?php _e( 'Your Theme', 'wp-accessibility' ); ?></h2>
695
696
<div class="inside">
697
<p>
705
</div>
706
<?php } ?>
707
708
+
709
+ <div class="ui-sortable meta-box-sortables">
710
+ <div class="postbox">
711
+ <h2 class='hndle'><?php _e( 'Contributing References', 'wp-accessibility' ); ?></h2>
712
+
713
+ <div class="inside">
714
+ <ul>
715
+ <li><a href="http://www.accessibleculture.org/articles/2010/08/continue-reading-links-in-wordpress/">Continue Reading Links in WordPress</a></li>
716
+ <li><a href="http://www.mothereffingtoolconfuser.com">Mother Effing Tool Confuser</a></li>
717
+ <li><a href="http://wordpress.org/extend/plugins/remove-title-attributes/">Remove Title Attributes</a></li>
718
+ <li><a href="http://accessites.org/site/2008/11/wordpress-and-accessibility/#comment-2926">WordPress and Accessibility (Comment)</a></li>
719
+ <li><a href="http://wordpress.org/extend/plugins/img-title-removal/">IMG Title Removal</a></li>
720
+ <li><a href="https://github.com/clrux/a11y">Accessibility Toolbar</a></li>
721
+ <li><a href="https://wordpress.org/plugins/long-description-for-image-attachments/">WordPress Long Description</a></li>
722
+ </ul>
723
+ </div>
724
+ </div>
725
+ </div>
726
+
727
+
728
</div>
729
</div>
730
wp-accessibility.php CHANGED
@@ -3,7 +3,7 @@
3
Plugin Name: WP Accessibility
4
Plugin URI: http://www.joedolson.com/wp-accessibility/
5
Description: Helps improve accessibility in your WordPress site, like removing title attributes.
6
- Version: 1.5.6
7
Author: Joe Dolson
8
Text Domain: wp-accessibility
9
Domain Path: /lang
@@ -44,7 +44,7 @@ function add_wpa_admin_menu() {
44
45
// ACTIVATION
46
function wpa_install() {
47
- $wpa_version = '1.5.6';
48
if ( get_option( 'wpa_installed' ) != 'true' ) {
49
add_option( 'rta_from_nav_menu', 'on' );
50
add_option( 'rta_from_page_lists', 'on' );
@@ -101,15 +101,13 @@ function wpa_javascript() {
101
}
102
103
function wpa_admin_stylesheet() {
104
- if ( get_option( 'wpa_admin_css' ) == 'on' ) {
105
- if ( file_exists( get_stylesheet_directory() . '/wp-admin.css' ) ) {
106
- $file = get_stylesheet_directory_uri() . '/wp-admin.css';
107
- } else {
108
- $file = plugins_url( 'css/wp-admin.css', __FILE__ );
109
- }
110
wp_register_style( 'wp-a11y-css', $file );
111
wp_enqueue_style( 'wp-a11y-css' );
112
}
113
if ( get_option( 'wpa_row_actions' ) == 'on' ) {
114
if ( file_exists( get_stylesheet_directory() . '/wp-admin-row-actions.css' ) ) {
115
$file = get_stylesheet_directory_uri() . '/wp-admin-row-actions.css';
@@ -286,16 +284,16 @@ function wpa_toolbar_js() {
286
//<![CDATA[
287
(function( $ ) { 'use strict';
288
var insert_a11y_toolbar = '<!-- a11y toolbar -->';
289
- insert_a11y_toolbar += '<div class=\"$responsive a11y-toolbar$is_rtl$is_right\" role=\"menu\">';
290
insert_a11y_toolbar += '<ul class=\"a11y-toolbar-list\">';";
291
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_fontsize ) {
292
- echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\" role=\"menuitem\"><button type=\"button\" class=\"a11y-toggle-contrast toggle-contrast\" id=\"is_normal_contrast\" aria-pressed=\"false\"><span class=\"offscreen\">$contrast</span><span class=\"aticon aticon-adjust\" aria-hidden=\"true\"></span></button></li>';";
293
}
294
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_grayscale ) {
295
- echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\" role=\"menuitem\"><button type=\"button\" class=\"a11y-toggle-grayscale toggle-grayscale\" id=\"is_normal_color\" aria-pressed=\"false\"><span class=\"offscreen\">$grayscale</span><span class=\"aticon aticon-tint\" aria-hidden=\"true\"></span></button></li>';";
296
}
297
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_contrast ) {
298
- echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\" role=\"menuitem\"><button type=\"button\" class=\"a11y-toggle-fontsize toggle-fontsize\" id=\"is_normal_fontsize\" aria-pressed=\"false\"><span class=\"offscreen\">$fontsize</span><span class=\"aticon aticon-font\" aria-hidden=\"true\"></span></button></li>';";
299
}
300
echo "
301
insert_a11y_toolbar += '</ul>';
@@ -438,7 +436,7 @@ function wpa_stylesheet() {
438
if ( get_option( 'wpa_toolbar_size' ) && get_option( 'wpa_toolbar' ) == 'on' ) {
439
echo "
440
<style type='text/css'>
441
- .a11y-toolbar ul li a {
442
font-size: " . get_option( 'wpa_toolbar_size' ) . " !important;
443
}
444
</style>";
@@ -828,10 +826,10 @@ $plugins_string
828
<input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' /> <label for='has_read_faq'>" . sprintf( __( 'I have read <a href="%1$s">the FAQ for this plug-in</a> <span>(required)</span>', 'wp-accessibility' ), 'http://www.joedolson.com/wp-accessibility/faqs/' ) . "</label>
829
</p>
830
<p>
831
- <input type='checkbox' name='has_donated' id='has_donated' value='on' /> <label for='has_donated'>" . sprintf( __( 'I <a href="%1$s">made a donation to help support this plug-in</a>', 'wp-accessibility' ), 'http://www.joedolson.com/donate/' ) . "</label>
832
</p>
833
<p>
834
- <label for='support_request'>" . __( 'Support Request:', 'wp-accessibility' ) . "</label><br /><textarea name='support_request' required aria-required='true' id='support_request' cols='80' rows='10'>" . stripslashes( $request ) . "</textarea>
835
</p>
836
<p>
837
<input type='submit' value='" . __( 'Send Support Request', 'wp-accessibility' ) . "' name='wpa_support' class='button-primary' />
@@ -981,7 +979,7 @@ function longdesc_add_attr( $html, $id, $caption, $title, $align, $url, $size, $
981
}
982
if ( ! empty( $image->post_content ) ) {
983
$search = '<img ';
984
- $replace = '<img tabindex="-1" id="' . esc_attr( longdesc_return_anchor( $image->ID ) ) . '" longdesc="' . esc_url( add_query_arg( $args, home_url() ) ) . '"';
985
$html = str_replace( $search, $replace, $html );
986
}
987
}
@@ -1001,6 +999,7 @@ function wpa_accessible_theme() {
1001
return false;
1002
}
1003
1004
add_action( 'init', 'wpa_dismiss_notice' );
1005
function wpa_dismiss_notice() {
1006
if ( isset( $_GET['dismiss'] ) && $_GET['dismiss'] == 'update' ) {
@@ -1016,6 +1015,7 @@ function wpa_update_notice() {
1016
echo "<div class='updated fade'><p>" . sprintf( __( 'Have you seen my new accessibility plug-in? <a href="%1$s">Check out Access Monitor</a>! &nbsp; &nbsp; <a href="%2$s">Dismiss Notice<span class="dashicons dashicons-no" aria-hidden="true"></span></a>', 'wp-accessibility' ), $access_monitor, $dismiss ) . "</p></div>";
1017
}
1018
}
1019
1020
add_filter( 'manage_media_columns', 'wpa_media_columns' );
1021
add_action( 'manage_media_custom_column', 'wpa_media_value', 10, 2 );
3
Plugin Name: WP Accessibility
4
Plugin URI: http://www.joedolson.com/wp-accessibility/
5
Description: Helps improve accessibility in your WordPress site, like removing title attributes.
6
+ Version: 1.5.7
7
Author: Joe Dolson
8
Text Domain: wp-accessibility
9
Domain Path: /lang
44
45
// ACTIVATION
46
function wpa_install() {
47
+ $wpa_version = '1.5.7';
48
if ( get_option( 'wpa_installed' ) != 'true' ) {
49
add_option( 'rta_from_nav_menu', 'on' );
50
add_option( 'rta_from_page_lists', 'on' );
101
}
102
103
function wpa_admin_stylesheet() {
104
+
105
+ if ( file_exists( get_stylesheet_directory() . '/wp-admin.css' ) ) {
106
+ $file = get_stylesheet_directory_uri() . '/wp-admin.css';
107
wp_register_style( 'wp-a11y-css', $file );
108
wp_enqueue_style( 'wp-a11y-css' );
109
}
110
+
111
if ( get_option( 'wpa_row_actions' ) == 'on' ) {
112
if ( file_exists( get_stylesheet_directory() . '/wp-admin-row-actions.css' ) ) {
113
$file = get_stylesheet_directory_uri() . '/wp-admin-row-actions.css';
284
//<![CDATA[
285
(function( $ ) { 'use strict';
286
var insert_a11y_toolbar = '<!-- a11y toolbar -->';
287
+ insert_a11y_toolbar += '<div class=\"$responsive a11y-toolbar$is_rtl$is_right\">';
288
insert_a11y_toolbar += '<ul class=\"a11y-toolbar-list\">';";
289
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_fontsize ) {
290
+ echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\"><button type=\"button\" class=\"a11y-toggle-contrast toggle-contrast\" id=\"is_normal_contrast\" aria-pressed=\"false\"><span class=\"offscreen\">$contrast</span><span class=\"aticon aticon-adjust\" aria-hidden=\"true\"></span></button></li>';";
291
}
292
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_grayscale ) {
293
+ echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\"><button type=\"button\" class=\"a11y-toggle-grayscale toggle-grayscale\" id=\"is_normal_color\" aria-pressed=\"false\"><span class=\"offscreen\">$grayscale</span><span class=\"aticon aticon-tint\" aria-hidden=\"true\"></span></button></li>';";
294
}
295
if ( get_option( 'wpa_toolbar' ) == 'on' && $enable_contrast ) {
296
+ echo "insert_a11y_toolbar += '<li class=\"a11y-toolbar-list-item\"><button type=\"button\" class=\"a11y-toggle-fontsize toggle-fontsize\" id=\"is_normal_fontsize\" aria-pressed=\"false\"><span class=\"offscreen\">$fontsize</span><span class=\"aticon aticon-font\" aria-hidden=\"true\"></span></button></li>';";
297
}
298
echo "
299
insert_a11y_toolbar += '</ul>';
436
if ( get_option( 'wpa_toolbar_size' ) && get_option( 'wpa_toolbar' ) == 'on' ) {
437
echo "
438
<style type='text/css'>
439
+ .a11y-toolbar ul li button {
440
font-size: " . get_option( 'wpa_toolbar_size' ) . " !important;
441
}
442
</style>";
826
<input type='checkbox' name='has_read_faq' id='has_read_faq' value='on' /> <label for='has_read_faq'>" . sprintf( __( 'I have read <a href="%1$s">the FAQ for this plug-in</a> <span>(required)</span>', 'wp-accessibility' ), 'http://www.joedolson.com/wp-accessibility/faqs/' ) . "</label>
827
</p>
828
<p>
829
+ <input type='checkbox' name='has_donated' id='has_donated' value='on' /> <label for='has_donated'>" . sprintf( __( 'I <a href="%1$s">made a donation</a> to help support this plugin', 'wp-accessibility' ), 'http://www.joedolson.com/donate/' ) . "</label>
830
</p>
831
<p>
832
+ <label for='support_request'>" . __( 'Support Request:', 'wp-accessibility' ) . "</label><br /><textarea name='support_request' required id='support_request' cols='80' rows='10' class='widefat'>" . stripslashes( $request ) . "</textarea>
833
</p>
834
<p>
835
<input type='submit' value='" . __( 'Send Support Request', 'wp-accessibility' ) . "' name='wpa_support' class='button-primary' />
979
}
980
if ( ! empty( $image->post_content ) ) {
981
$search = '<img ';
982
+ $replace = '<img tabindex="-1" id="' . esc_attr( longdesc_return_anchor( $image->ID ) ) . '" longdesc="' . esc_url( add_query_arg( $args, home_url() ) ) . '" ';
983
$html = str_replace( $search, $replace, $html );
984
}
985
}
999
return false;
1000
}
1001
1002
+ /*
1003
add_action( 'init', 'wpa_dismiss_notice' );
1004
function wpa_dismiss_notice() {
1005
if ( isset( $_GET['dismiss'] ) && $_GET['dismiss'] == 'update' ) {
1015
echo "<div class='updated fade'><p>" . sprintf( __( 'Have you seen my new accessibility plug-in? <a href="%1$s">Check out Access Monitor</a>! &nbsp; &nbsp; <a href="%2$s">Dismiss Notice<span class="dashicons dashicons-no" aria-hidden="true"></span></a>', 'wp-accessibility' ), $access_monitor, $dismiss ) . "</p></div>";
1016
}
1017
}
1018
+ */
1019
1020
add_filter( 'manage_media_columns', 'wpa_media_columns' );
1021
add_action( 'manage_media_custom_column', 'wpa_media_value', 10, 2 );