Version Description
- FIXED: Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines
Download this release
Release Info
Developer | philbuchanan |
Plugin | Accordion Shortcodes |
Version | 2.4.1 |
Comparing to | |
See all releases |
Code changes from version 2.4.0 to 2.4.1
- accordion-shortcodes.php +2 -2
- accordion.js +1 -1
- accordion.min.js +1 -1
- readme.txt +7 -1
accordion-shortcodes.php
CHANGED
@@ -2,7 +2,7 @@
|
|
2 |
/**
|
3 |
* Plugin Name: Accordion Shortcodes
|
4 |
* Description: Shortcodes for creating responsive accordion drop-downs.
|
5 |
-
* Version: 2.4.
|
6 |
* Author: Phil Buchanan
|
7 |
* Author URI: http://philbuchanan.com
|
8 |
*/
|
@@ -17,7 +17,7 @@ class Accordion_Shortcodes {
|
|
17 |
/**
|
18 |
* Current plugin version number
|
19 |
*/
|
20 |
-
private $plugin_version = '2.4.
|
21 |
|
22 |
|
23 |
|
2 |
/**
|
3 |
* Plugin Name: Accordion Shortcodes
|
4 |
* Description: Shortcodes for creating responsive accordion drop-downs.
|
5 |
+
* Version: 2.4.1
|
6 |
* Author: Phil Buchanan
|
7 |
* Author URI: http://philbuchanan.com
|
8 |
*/
|
17 |
/**
|
18 |
* Current plugin version number
|
19 |
*/
|
20 |
+
private $plugin_version = '2.4.1';
|
21 |
|
22 |
|
23 |
|
accordion.js
CHANGED
@@ -74,7 +74,7 @@
|
|
74 |
clickControllerHandler(item);
|
75 |
});
|
76 |
|
77 |
-
$(this).
|
78 |
var code = event.which;
|
79 |
|
80 |
// We only need to add manual keyboard events if _not_ using `<button>` elements
|
74 |
clickControllerHandler(item);
|
75 |
});
|
76 |
|
77 |
+
$(this).keyup(function(event) {
|
78 |
var code = event.which;
|
79 |
|
80 |
// We only need to add manual keyboard events if _not_ using `<button>` elements
|
accordion.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(d){"use strict";var t;d.fn.accordionShortcodes=function(o){var r=[],t=d(".js-accordion-controller"),s=window.location.hash,n=250,a=d.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1,usebuttons:!1},o);function i(o,t){o.content.clearQueue().stop().slideDown(n,function(){t&&a.scroll&&d("html, body").animate({scrollTop:o.controller.offset().top-a.scrollOffset},n)}),o.controller.addClass("open read"),o.controller.attr("aria-expanded","true"),o.content.attr("aria-hidden","false"),o.isOpen=!0}function l(o){o.content.slideUp(n),o.controller.removeClass("open"),o.controller.attr("aria-expanded","false"),o.content.attr("aria-hidden","true"),o.isOpen=!1}return d(".accordion").removeClass("no-js"),a.scrollOffset=0|Math.floor(parseInt(a.scroll)),t.each(function(o){var t=!1;switch(0==o&&a.openFirst&&(t=!0),a.openAll&&(t=!0),d(this).data("initialstate")){case"open":t=!0;break;case"closed":t=!1}s.length&&s=="#"+d(this).attr("id")&&(t=!0);var n,e,c=(n=d(this),e=t,{id:n.attr("id"),controller:n,controls:n.attr("aria-controls"),content:d("#"+n.attr("aria-controls")),isOpen:e||!1});r.push(c),d(this).click(function(o){var t;(t=c).isOpen?a.clickToClose&&l(t):(a.autoClose&&d.each(r,function(o,t){l(t)}),i(t,!0))}),d(this).
|
1 |
+
!function(d){"use strict";var t;d.fn.accordionShortcodes=function(o){var r=[],t=d(".js-accordion-controller"),s=window.location.hash,n=250,a=d.extend({autoClose:!0,openFirst:!1,openAll:!1,clickToClose:!1,scroll:!1,usebuttons:!1},o);function i(o,t){o.content.clearQueue().stop().slideDown(n,function(){t&&a.scroll&&d("html, body").animate({scrollTop:o.controller.offset().top-a.scrollOffset},n)}),o.controller.addClass("open read"),o.controller.attr("aria-expanded","true"),o.content.attr("aria-hidden","false"),o.isOpen=!0}function l(o){o.content.slideUp(n),o.controller.removeClass("open"),o.controller.attr("aria-expanded","false"),o.content.attr("aria-hidden","true"),o.isOpen=!1}return d(".accordion").removeClass("no-js"),a.scrollOffset=0|Math.floor(parseInt(a.scroll)),t.each(function(o){var t=!1;switch(0==o&&a.openFirst&&(t=!0),a.openAll&&(t=!0),d(this).data("initialstate")){case"open":t=!0;break;case"closed":t=!1}s.length&&s=="#"+d(this).attr("id")&&(t=!0);var n,e,c=(n=d(this),e=t,{id:n.attr("id"),controller:n,controls:n.attr("aria-controls"),content:d("#"+n.attr("aria-controls")),isOpen:e||!1});r.push(c),d(this).click(function(o){var t;(t=c).isOpen?a.clickToClose&&l(t):(a.autoClose&&d.each(r,function(o,t){l(t)}),i(t,!0))}),d(this).keyup(function(o){var t=o.which;a.usebuttons||13!==t&&32!==t||d(this).click(),27===t&&a.clickToClose&&l(c)}),c.isOpen?i(c):l(c)}),d(window).on("hashchange",function(){(s=d(window.location.hash)).length&&s.hasClass("js-accordion-controller")&&s.click()}),this},d(window).on("load",function(){for(var o=0;o<accordionShortcodesSettings.length;o+=1)t=accordionShortcodesSettings[o],d("#"+t.id).accordionShortcodes(t)})}(jQuery);
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate Link: http://philbuchanan.com/
|
|
5 |
Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
|
6 |
Requires at least: 3.3
|
7 |
Tested up to: 5.1
|
8 |
-
Stable tag: 2.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -265,6 +265,9 @@ For bug reports or feature requests or if you'd like to contribute to the plugin
|
|
265 |
3. The Accordion Item shortcode insertion dialog box
|
266 |
|
267 |
== Changelog ==
|
|
|
|
|
|
|
268 |
= 2.4.0 =
|
269 |
* NEW: Added option to add a button tag wrapper around the accordion title
|
270 |
* FIXED: better accessibility support
|
@@ -331,6 +334,9 @@ FIXED: A bug where setting both scroll and openfirst would scroll the window wit
|
|
331 |
* FIXED: A few incredibly small bugs/annoyances
|
332 |
|
333 |
== Upgrade Notice ==
|
|
|
|
|
|
|
334 |
= 2.4.0 =
|
335 |
Updated accessibility. Added an option to a button wrapper around each accordion item title.
|
336 |
|
5 |
Tags: accordion, accordions, shortcodes, responsive accordions, accordions plugin, jquery accordions, accordions short-code, accordions plugin wordpress, accordions plugin jquery
|
6 |
Requires at least: 3.3
|
7 |
Tested up to: 5.1
|
8 |
+
Stable tag: 2.4.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
265 |
3. The Accordion Item shortcode insertion dialog box
|
266 |
|
267 |
== Changelog ==
|
268 |
+
= 2.4.1 =
|
269 |
+
* FIXED: Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines
|
270 |
+
|
271 |
= 2.4.0 =
|
272 |
* NEW: Added option to add a button tag wrapper around the accordion title
|
273 |
* FIXED: better accessibility support
|
334 |
* FIXED: A few incredibly small bugs/annoyances
|
335 |
|
336 |
== Upgrade Notice ==
|
337 |
+
= 2.4.1 =
|
338 |
+
Accordions now open onkeyup instead of onkeydown to better comply with WCAG 2.1 accessibility guidelines.
|
339 |
+
|
340 |
= 2.4.0 =
|
341 |
Updated accessibility. Added an option to a button wrapper around each accordion item title.
|
342 |
|