WP Accessibility - Version 1.8.1

Version Description

  • Update: Fix accessibility issues in longdesc disclosure button.
  • Add: style variations on longdesc disclosure to adjust position. (.top-left, .top-right, .bottom-right)
  • Update tested to for WP 6.0.
Download this release

Release Info

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

Code changes from version 1.8.0 to 1.8.1

Files changed (4) hide show
  1. css/wpa-style.css +25 -21
  2. js/longdesc.button.js +3 -1
  3. readme.txt +8 -2
  4. wp-accessibility.php +3 -3
css/wpa-style.css CHANGED
@@ -1,3 +1,4 @@
 
1
  .wpa-hide-ltr#skiplinks a, .wpa-hide-ltr#skiplinks a:hover, .wpa-hide-ltr#skiplinks a:visited,
2
  .wpa-hide-rtl#skiplinks a, .wpa-hide-rtl#skiplinks a:hover, .wpa-hide-rtl#skiplinks a:visited {
3
  border: 0;
@@ -63,6 +64,23 @@ div.aligncenter {
63
  min-width: 24px;
64
  }
65
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  .wpa-ld img {
67
  display: block;
68
  }
@@ -94,38 +112,24 @@ div.aligncenter {
94
  .wpa-ld button, .wpa-ld button:active, .wpa-ld button:focus, .wpa-ld button:hover, .wpa-ld a {
95
  font-size: 1em;
96
  font-weight: 400;
97
- background: rgba(255, 255, 255, .7) !important;
98
  padding: 0;
99
  color: #000 !important;
100
- text-shadow: 1px 1px #ccc;
 
101
  }
102
 
103
- .wpa-ld button:before {
104
- content: 'i';
105
- font-style: italic;
106
- font-family: serif;
107
- }
108
 
109
  .wpa-ld button:focus, .wpa-ld button:hover {
110
- background: rgba(0, 0, 0, .75) !important;
111
  color: #fff !important;
112
  border: 1px solid #000 !important;
113
  cursor: pointer;
114
  }
115
 
116
- .wpa-ld button:focus {
117
- padding: 6px;
118
- }
119
-
120
- .wpa-ld button span, .longdesc-link span {
121
- position: absolute !important;
122
- height: 1px;
123
- width: 1px;
124
- overflow: hidden;
125
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
126
- clip: rect(1px, 1px, 1px, 1px);
127
- }
128
-
129
  .template-longdesc {
130
  text-align: left;
131
  line-height: 1.5;
1
+ .wpa-ld button span.screen-reader, .longdesc-link span.screen-reader,
2
  .wpa-hide-ltr#skiplinks a, .wpa-hide-ltr#skiplinks a:hover, .wpa-hide-ltr#skiplinks a:visited,
3
  .wpa-hide-rtl#skiplinks a, .wpa-hide-rtl#skiplinks a:hover, .wpa-hide-rtl#skiplinks a:visited {
4
  border: 0;
64
  min-width: 24px;
65
  }
66
 
67
+ .top-left .wpa-ld a, .top-left .wpa-ld button {
68
+ top: 2px;
69
+ bottom: auto;
70
+ }
71
+
72
+ .top-right .wpa-ld a, .top-right .wpa-ld button {
73
+ top: 2px;
74
+ right: 2px;
75
+ left: auto;
76
+ bottom: auto;
77
+ }
78
+
79
+ .bottom-right .wpa-ld a, .bottom-right .wpa-ld button {
80
+ right: 2px;
81
+ left: auto;
82
+ }
83
+
84
  .wpa-ld img {
85
  display: block;
86
  }
112
  .wpa-ld button, .wpa-ld button:active, .wpa-ld button:focus, .wpa-ld button:hover, .wpa-ld a {
113
  font-size: 1em;
114
  font-weight: 400;
115
+ background: rgba(255, 255, 255, .8) !important;
116
  padding: 0;
117
  color: #000 !important;
118
+ padding: 3px 6px;
119
+ border-radius: 3px;
120
  }
121
 
122
+ .wpa-ld .dashicons, .wpa-ld .dashicons:before {
123
+ line-height: inherit;
124
+ }
 
 
125
 
126
  .wpa-ld button:focus, .wpa-ld button:hover {
127
+ background: rgba(0, 0, 0, .8) !important;
128
  color: #fff !important;
129
  border: 1px solid #000 !important;
130
  cursor: pointer;
131
  }
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  .template-longdesc {
134
  text-align: left;
135
  line-height: 1.5;
js/longdesc.button.js CHANGED
@@ -46,8 +46,8 @@
46
  img.attr('id','longdesc-return-' + image_id );
47
  img.wrap('<div class="wpa-ld" />')
48
  img.parent('.wpa-ld').addClass(classes);
 
49
  img.parent('.wpa-ld').append('<div class="longdesc" aria-live="assertive"></div>');
50
- img.parent('.wpa-ld').append('<button>' + wparest.text + '</button>');
51
  var container = img.parent('.wpa-ld').children('.longdesc');
52
  container.hide();
53
  container.load( longdesc + ' #desc_' + image_id );
@@ -55,8 +55,10 @@
55
  e.preventDefault();
56
  var visible = container.is( ':visible' );
57
  if ( visible ) {
 
58
  container.hide();
59
  } else {
 
60
  container.show(150);
61
  }
62
  });
46
  img.attr('id','longdesc-return-' + image_id );
47
  img.wrap('<div class="wpa-ld" />')
48
  img.parent('.wpa-ld').addClass(classes);
49
+ img.parent('.wpa-ld').append('<button aria-expanded="false">' + wparest.text + '</button>');
50
  img.parent('.wpa-ld').append('<div class="longdesc" aria-live="assertive"></div>');
 
51
  var container = img.parent('.wpa-ld').children('.longdesc');
52
  container.hide();
53
  container.load( longdesc + ' #desc_' + image_id );
55
  e.preventDefault();
56
  var visible = container.is( ':visible' );
57
  if ( visible ) {
58
+ $( this ).attr( 'aria-expanded', 'false' );
59
  container.hide();
60
  } else {
61
+ $( this ).attr( 'aria-expanded', 'true' );
62
  container.show(150);
63
  }
64
  });
readme.txt CHANGED
@@ -4,8 +4,8 @@ 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
  Requires PHP: 5.6
7
- Tested up to: 5.9
8
- Stable tag: 1.8.0
9
  Text Domain: wp-accessibility
10
  License: GPLv2 or later
11
 
@@ -76,6 +76,12 @@ The plug-in is intended to help with deficiencies commonly found in themes and t
76
 
77
  [Suggest a change!](https://github.com/joedolson/wp-accessibility/issues/)
78
 
 
 
 
 
 
 
79
  = 1.8.0 =
80
 
81
  * Update: tabindex check should not remove tabindex on `a` elements without `href`.
4
  Tags: title, accessibility, accessible, navigation, wcag, a11y, section508, focus, alt text, labels, aria
5
  Requires at least: 3.4.2
6
  Requires PHP: 5.6
7
+ Tested up to: 6.0
8
+ Stable tag: 1.8.1
9
  Text Domain: wp-accessibility
10
  License: GPLv2 or later
11
 
76
 
77
  [Suggest a change!](https://github.com/joedolson/wp-accessibility/issues/)
78
 
79
+ = 1.8.1 =
80
+
81
+ * Update: Fix accessibility issues in longdesc disclosure button.
82
+ * Add: style variations on longdesc disclosure to adjust position. (.top-left, .top-right, .bottom-right)
83
+ * Update tested to for WP 6.0.
84
+
85
  = 1.8.0 =
86
 
87
  * Update: tabindex check should not remove tabindex on `a` elements without `href`.
wp-accessibility.php CHANGED
@@ -17,7 +17,7 @@
17
  * Domain Path: /lang
18
  * License: GPL-2.0+
19
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
20
- * Version: 1.8.0
21
  */
22
 
23
  /*
@@ -68,7 +68,7 @@ function wpa_admin_menu() {
68
  * Install on activation.
69
  */
70
  function wpa_install() {
71
- $wpa_version = '1.8.0';
72
  if ( 'true' !== get_option( 'wpa_installed' ) ) {
73
  add_option( 'rta_from_tag_clouds', 'on' );
74
  add_option( 'asl_styles_focus', '' );
@@ -152,7 +152,7 @@ function wpacc_enqueue_scripts() {
152
  'wparest',
153
  array(
154
  'url' => get_rest_url( null, 'wp/v2/media' ),
155
- 'text' => '<span>' . __( 'Long Description', 'wp-accessibility' ) . '</span>',
156
  )
157
  );
158
  }
17
  * Domain Path: /lang
18
  * License: GPL-2.0+
19
  * License URI: http://www.gnu.org/license/gpl-2.0.txt
20
+ * Version: 1.8.1
21
  */
22
 
23
  /*
68
  * Install on activation.
69
  */
70
  function wpa_install() {
71
+ $wpa_version = '1.8.1';
72
  if ( 'true' !== get_option( 'wpa_installed' ) ) {
73
  add_option( 'rta_from_tag_clouds', 'on' );
74
  add_option( 'asl_styles_focus', '' );
152
  'wparest',
153
  array(
154
  'url' => get_rest_url( null, 'wp/v2/media' ),
155
+ 'text' => '<span class="dashicons dashicons-media-text" aria-hidden="true"></span><span class="screen-reader">' . __( 'Long Description', 'wp-accessibility' ) . '</span>',
156
  )
157
  );
158
  }