WP Accessibility - Version 1.6.1

Version Description

  • Fixed changelog, which read 1.5.11 instead of 1.6.0
  • Fixed logic in widget version of toolbar so wouldn't use buttons unless requested
  • Update 'tested to' version.
Download this release

Release Info

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

Code changes from version 1.6.0 to 1.6.1

Files changed (3) hide show
  1. readme.txt +12 -3
  2. wp-accessibility-toolbar.php +3 -3
  3. wp-accessibility.php +15 -15
readme.txt CHANGED
@@ -3,8 +3,8 @@ Contributors: joedolson
3
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.7
7
- Stable tag: 1.5.10
8
Text Domain: wp-accessibility
9
License: GPLv2 or later
10
@@ -59,8 +59,17 @@ Translating my plug-ins is always appreciated. Visit <a href="https://translate.
59
= Future =
60
61
[Suggest a change!](https://github.com/joedolson/wp-accessibility/)
62
63
- = 1.5.11 =
64
65
* Bug fix: incorrect CSS style reference on longdesc template
66
* Re-enable Toolbar on Edge (slightly different from other browsers, but functional.)
3
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.9
7
+ Stable tag: 1.6.1
8
Text Domain: wp-accessibility
9
License: GPLv2 or later
10
59
= Future =
60
61
[Suggest a change!](https://github.com/joedolson/wp-accessibility/)
62
+ * Conflict with NextGen gallery to explore
63
+ * Gutenberg: filter colors in cover text?
64
+ *
65
66
+ = 1.6.1 =
67
+
68
+ * Fixed changelog, which read 1.5.11 instead of 1.6.0
69
+ * Fixed logic in widget version of toolbar so wouldn't use buttons unless requested
70
+ * Update 'tested to' version.
71
+
72
+ = 1.6.0 =
73
74
* Bug fix: incorrect CSS style reference on longdesc template
75
* Re-enable Toolbar on Edge (slightly different from other browsers, but functional.)
wp-accessibility-toolbar.php CHANGED
@@ -12,8 +12,8 @@ function wpa_toolbar_html( $type = 'widget' ) {
12
$is_rtl = ( is_rtl() ) ? ' rtl' : ' ltr';
13
$is_right = ( get_option( 'wpa_toolbar_right' ) == 'on' ) ? ' right' : ' left';
14
$toolbar_type = ( $type == 'widget' ) ? 'a11y-toolbar-widget' : 'a11y-toolbar';
15
- $control_type = ( $type == 'button' ) ? 'a href="#" role="button"' : 'button type="button"'; // button control does not work in Edge.
16
- $closure = ( $type == 'button' ) ? 'a' : 'button'; // button control does not work in Edge
17
$toolbar = '
18
<!-- a11y toolbar widget -->
19
<div class="' . $responsive . ' ' . $is_rtl . ' ' . $is_right . ' ' . $toolbar_type . '">
@@ -45,7 +45,7 @@ function wpa_toolbar_js() {
45
$responsive = ( get_option( 'wpa_toolbar_mobile' ) == 'on' ) ? 'a11y-responsive ' : 'a11y-non-responsive ';
46
47
if ( preg_match( '/Edge/i', $user_agent ) ) {
48
- echo wpa_toolbar_html( 'button' );
49
echo "<script type='text/javascript'>
50
//<![CDATA[
51
(function( $ ) { 'use strict';
12
$is_rtl = ( is_rtl() ) ? ' rtl' : ' ltr';
13
$is_right = ( get_option( 'wpa_toolbar_right' ) == 'on' ) ? ' right' : ' left';
14
$toolbar_type = ( $type == 'widget' ) ? 'a11y-toolbar-widget' : 'a11y-toolbar';
15
+ $control_type = ( $type != 'button' ) ? 'a href="#" role="button"' : 'button type="button"'; // button control does not work in Edge.
16
+ $closure = ( $type != 'button' ) ? 'a' : 'button'; // button control does not work in Edge
17
$toolbar = '
18
<!-- a11y toolbar widget -->
19
<div class="' . $responsive . ' ' . $is_rtl . ' ' . $is_right . ' ' . $toolbar_type . '">
45
$responsive = ( get_option( 'wpa_toolbar_mobile' ) == 'on' ) ? 'a11y-responsive ' : 'a11y-non-responsive ';
46
47
if ( preg_match( '/Edge/i', $user_agent ) ) {
48
+ echo wpa_toolbar_html( 'js' );
49
echo "<script type='text/javascript'>
50
//<![CDATA[
51
(function( $ ) { 'use strict';
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.6.0
7
Author: Joe Dolson
8
Text Domain: wp-accessibility
9
Domain Path: /lang
@@ -63,7 +63,7 @@ function wpa_write_js() {
63
64
// ACTIVATION
65
function wpa_install() {
66
- $wpa_version = '1.6.0';
67
if ( get_option( 'wpa_installed' ) != 'true' ) {
68
add_option( 'rta_from_nav_menu', 'on' );
69
add_option( 'rta_from_page_lists', 'on' );
@@ -290,20 +290,20 @@ function wpa_jquery_asl() {
290
if ( $extra != '' && ! wpa_is_url( $extra ) ) {
291
$extra = "#$extra";
292
}
293
- $extra_text = stripslashes( get_option( 'asl_extra_text' ) );
294
- $content = str_replace( '#', '', esc_attr( get_option( 'asl_content' ) ) );
295
- $nav = str_replace( '#', '', esc_attr( get_option( 'asl_navigation' ) ) );
296
- $sitemap = esc_url( get_option( 'asl_sitemap' ) );
297
- $html .= ( $content != '' ) ? "<a href=\"#$content\">" . __( 'Skip to content', 'wp-accessibility' ) . "</a> " : '';
298
- $html .= ( $nav != '' ) ? "<a href=\"#$nav\">" . __( 'Skip to navigation', 'wp-accessibility' ) . "</a> " : '';
299
- $html .= ( $sitemap != '' ) ? "<a href=\"$sitemap\">" . __( 'Site map', 'wp-accessibility' ) . "</a> " : '';
300
- $html .= ( $extra != '' && $extra_text != '' ) ? "<a href=\"$extra\">$extra_text</a> " : '';
301
- $is_rtl = ( is_rtl() ) ? '-rtl' : '-ltr';
302
- $skiplinks = __( 'Skip links', 'wp-accessibility' );
303
- $output = ( $html != '' ) ? "<div class=\"$visibility$is_rtl\" id=\"skiplinks\" role=\"navigation\" aria-label=\"$skiplinks\">$html</div>" : '';
304
// attach skiplinks HTML; set tabindex on #content area to -1
305
- $focusable = ( $content != '' ) ? "$('#$content').attr('tabindex','-1');" : '';
306
- $focusable .= ( $nav != '' ) ? "$('#$nav').attr('tabindex','-1');" : '';
307
$skiplinks_js = ( $output ) ? "$('body').prepend('$output'); $focusable" : '';
308
}
309
// attach language to html element
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.6.1
7
Author: Joe Dolson
8
Text Domain: wp-accessibility
9
Domain Path: /lang
63
64
// ACTIVATION
65
function wpa_install() {
66
+ $wpa_version = '1.6.1';
67
if ( get_option( 'wpa_installed' ) != 'true' ) {
68
add_option( 'rta_from_nav_menu', 'on' );
69
add_option( 'rta_from_page_lists', 'on' );
290
if ( $extra != '' && ! wpa_is_url( $extra ) ) {
291
$extra = "#$extra";
292
}
293
+ $extra_text = stripslashes( get_option( 'asl_extra_text' ) );
294
+ $content = str_replace( '#', '', esc_attr( get_option( 'asl_content' ) ) );
295
+ $nav = str_replace( '#', '', esc_attr( get_option( 'asl_navigation' ) ) );
296
+ $sitemap = esc_url( get_option( 'asl_sitemap' ) );
297
+ $html .= ( $content != '' ) ? "<a href=\"#$content\">" . __( 'Skip to content', 'wp-accessibility' ) . "</a> " : '';
298
+ $html .= ( $nav != '' ) ? "<a href=\"#$nav\">" . __( 'Skip to navigation', 'wp-accessibility' ) . "</a> " : '';
299
+ $html .= ( $sitemap != '' ) ? "<a href=\"$sitemap\">" . __( 'Site map', 'wp-accessibility' ) . "</a> " : '';
300
+ $html .= ( $extra != '' && $extra_text != '' ) ? "<a href=\"$extra\">$extra_text</a> " : '';
301
+ $is_rtl = ( is_rtl() ) ? '-rtl' : '-ltr';
302
+ $skiplinks = __( 'Skip links', 'wp-accessibility' );
303
+ $output = ( $html != '' ) ? "<div class=\"$visibility$is_rtl\" id=\"skiplinks\" role=\"navigation\" aria-label=\"$skiplinks\">$html</div>" : '';
304
// attach skiplinks HTML; set tabindex on #content area to -1
305
+ $focusable = ( $content != '' ) ? "$('#$content').attr('tabindex','-1');" : '';
306
+ $focusable .= ( $nav != '' ) ? "$('#$nav').attr('tabindex','-1');" : '';
307
$skiplinks_js = ( $output ) ? "$('body').prepend('$output'); $focusable" : '';
308
}
309
// attach language to html element