WordPress.org

Plugin Directory

Changeset 706598


Ignore:
Timestamp:
05/01/13 18:59:44 (12 months ago)
Author:
joedolson
Message:

Adds italian, fixes minor bugs.

Location:
wp-accessibility/trunk
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • wp-accessibility/trunk/readme.txt

    r690786 r706598  
    22Contributors: joedolson 
    33Donate link: http://www.joedolson.com/donate.php 
    4 Tags: title, accessibility, accessible, navigation, wcag, a11y 
     4Tags: title, accessibility, accessible, navigation, wcag, a11y, section508, focus 
    55Requires at least: 3.4.2 
    66Tested up to: 3.5.1 
     
    1212== Description == 
    1313 
    14 This plug-in is for correcting a variety of common accessibility issues encountered in WordPress themes. While most accessibility issues can't be easily addressed using abstracted code, WP Accessibility can provide a number of accessibility features with a minimum mount of setup and expert knowledge. 
     14This plug-in helps correct a variety of common accessibility problems in WordPress themes. While most accessibility issues can't be addressed without directly changing your theme, WP Accessibility adds a number of helpful accessibility features with the minimum amount of setup or expert knowledge. 
    1515 
    16 All features can be disabled according to your theme's needs. All of the functions based on modifying stylesheets can be customized using your own custom styles by placing the appropriate stylesheet in your theme directory. 
     16All features can be disabled according to your theme's needs. For advanced users, all of the functions based on modifying stylesheets can be customized using your own custom styles by placing the appropriate stylesheet in your theme directory. 
    1717 
    1818At the moment, the plug-in can: 
     
    4545 
    4646== Changelog == 
     47 
     48= 1.2.3 = 
     49 
     50* Updated jQuery ScrollTo to version 1.4.5 to resolve JS conflict. 
     51* Updated method of accessing $ in jQuery. 
     52* Added CDATA blocks so WP Accessibility doesn't prevent validation as XML. 
     53* Added Italian translation, courtesy of Roberto Scano. 
    4754 
    4855= 1.2.2 = 
  • wp-accessibility/trunk/toolbar/js/jquery.scrollto.min.js

    r664937 r706598  
    1 /* 
    2  MIT License {@link http://creativecommons.org/licenses/MIT/} 
    3 */ 
    4 (function(m,n){var e,k;e=m.jQuery;k=e.ScrollTo=e.ScrollTo||{config:{duration:400,easing:"swing",callback:n,durationMode:"each",offsetTop:0,offsetLeft:0},configure:function(f){e.extend(k.config,f||{});return this},scroll:function(f,c){var a,b,d,g,i,h,l,j;a=f.pop();b=a.$container;d=b.get(0);g=a.$target;i=e("<span/>").css({position:"absolute",top:"0px",left:"0px"});h=b.css("position");b.css("position","relative");i.appendTo(b);a=i.offset().top;a=g.offset().top-a-parseInt(c.offsetTop,10);j=i.offset().left; 
    5 j=g.offset().left-j-parseInt(c.offsetLeft,10);g=d.scrollTop;d=d.scrollLeft;i.remove();b.css("position",h);i=function(a){0===f.length?"function"===typeof c.callback&&c.callback.apply(this,[a]):k.scroll(f,c);return!0};c.onlyIfOutside&&(h=g+b.height(),l=d+b.width(),g<a&&a<h&&(a=g),d<j&&j<l&&(j=d));h={};a!==g&&(h.scrollTop=a+"px");j!==d&&(h.scrollLeft=j+"px");h.scrollTop||h.scrollLeft?b.animate(h,c.duration,c.easing,i):i();return!0},fn:function(f){var c,a,b;c=[];var d=e(this);if(0===d.length)return this; 
    6 f=e.extend({},k.config,f);a=d.parent();for(b=a.get(0);1===a.length&&b!==document.body&&b!==document;){var g;g="visible"!==a.css("overflow-y")&&b.scrollHeight!==b.clientHeight;b="visible"!==a.css("overflow-x")&&b.scrollWidth!==b.clientWidth;if(g||b)c.push({$container:a,$target:d}),d=a;a=a.parent();b=a.get(0)}c.push({$container:e(e.browser.msie||e.browser.mozilla?"html":"body"),$target:d});"all"===f.durationMode&&(f.duration/=c.length);k.scroll(c,f);return this}};e.fn.ScrollTo=e.ScrollTo.fn})(window); 
     1/** 
     2 * Copyright (c) 2007-2013 Ariel Flesler - aflesler<a>gmail<d>com | http://flesler.blogspot.com 
     3 * Dual licensed under MIT and GPL. 
     4 * @author Ariel Flesler 
     5 * @version 1.4.5 
     6 */ 
     7;(function($){var h=$.scrollTo=function(a,b,c){$(window).scrollTo(a,b,c)};h.defaults={axis:'xy',duration:parseFloat($.fn.jquery)>=1.3?0:1,limit:true};h.window=function(a){return $(window)._scrollable()};$.fn._scrollable=function(){return this.map(function(){var a=this,isWin=!a.nodeName||$.inArray(a.nodeName.toLowerCase(),['iframe','#document','html','body'])!=-1;if(!isWin)return a;var b=(a.contentWindow||a).document||a.ownerDocument||a;return/webkit/i.test(navigator.userAgent)||b.compatMode=='BackCompat'?b.body:b.documentElement})};$.fn.scrollTo=function(e,f,g){if(typeof f=='object'){g=f;f=0}if(typeof g=='function')g={onAfter:g};if(e=='max')e=9e9;g=$.extend({},h.defaults,g);f=f||g.duration;g.queue=g.queue&&g.axis.length>1;if(g.queue)f/=2;g.offset=both(g.offset);g.over=both(g.over);return this._scrollable().each(function(){if(e==null)return;var d=this,$elem=$(d),targ=e,toff,attr={},win=$elem.is('html,body');switch(typeof targ){case'number':case'string':if(/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)){targ=both(targ);break}targ=$(targ,this);if(!targ.length)return;case'object':if(targ.is||targ.style)toff=(targ=$(targ)).offset()}$.each(g.axis.split(''),function(i,a){var b=a=='x'?'Left':'Top',pos=b.toLowerCase(),key='scroll'+b,old=d[key],max=h.max(d,a);if(toff){attr[key]=toff[pos]+(win?0:old-$elem.offset()[pos]);if(g.margin){attr[key]-=parseInt(targ.css('margin'+b))||0;attr[key]-=parseInt(targ.css('border'+b+'Width'))||0}attr[key]+=g.offset[pos]||0;if(g.over[pos])attr[key]+=targ[a=='x'?'width':'height']()*g.over[pos]}else{var c=targ[pos];attr[key]=c.slice&&c.slice(-1)=='%'?parseFloat(c)/100*max:c}if(g.limit&&/^\d+$/.test(attr[key]))attr[key]=attr[key]<=0?0:Math.min(attr[key],max);if(!i&&g.queue){if(old!=attr[key])animate(g.onAfterFirst);delete attr[key]}});animate(g.onAfter);function animate(a){$elem.animate(attr,f,g.easing,a&&function(){a.call(this,e,g)})}}).end()};h.max=function(a,b){var c=b=='x'?'Width':'Height',scroll='scroll'+c;if(!$(a).is('html,body'))return a[scroll]-$(a)[c.toLowerCase()]();var d='client'+c,html=a.ownerDocument.documentElement,body=a.ownerDocument.body;return Math.max(html[scroll],body[scroll])-Math.min(html[d],body[d])};function both(a){return typeof a=='object'?a:{top:a,left:a}}})(jQuery); 
  • wp-accessibility/trunk/wp-accessibility.php

    r690775 r706598  
    44Plugin URI: http://www.joedolson.com/articles/wp-accessibility/ 
    55Description: Provides options to improve accessibility in your WordPress site, including removing title attributes. 
    6 Version: 1.2.2 
     6Version: 1.2.3 
    77Author: Joe Dolson 
    88Author URI: http://www.joedolson.com/ 
     
    3737// ACTIVATION 
    3838function wpa_install() { 
    39     $wpa_version = '1.2.2'; 
     39    $wpa_version = '1.2.3'; 
    4040    if ( get_option('wpa_installed') != 'true' ) { 
    4141        add_option('rta_from_nav_menu', 'on'); 
     
    7474} 
    7575//Add Plugin Actions to WordPress 
    76 add_filter('plugin_action_links', 'wpa_plugin_action', -10, 2); 
    77 add_action( 'wp_enqueue_scripts', 'wpa_register_scripts'); 
     76add_filter( 'plugin_action_links', 'wpa_plugin_action', -10, 2 ); 
     77add_action( 'wp_enqueue_scripts', 'wpa_register_scripts' ); 
    7878add_action( 'admin_menu', 'wpa_javascript' ); 
    7979 
     
    103103    if ( isset($_GET['page']) && $_GET['page']=='wp-accessibility/wp-accessibility.php' ) { 
    104104    ?> 
    105 <script type="text/javascript"> 
    106 jQuery(document).ready(function($) { 
     105<script> 
     106//<![CDATA[ 
     107(function( $ ) { 'use strict'; 
    107108    $('#fore').farbtastic('#color1'); 
    108109    $('#back').farbtastic('#color2'); 
    109 }); 
     110}(jQuery)); 
     111//]]> 
    110112</script> 
    111113    <?php 
     
    116118    wp_register_script( 'skiplinks.webkit', plugins_url( 'wp-accessibility/js/skiplinks.webkit.js' ) );  
    117119    wp_register_script( 'ui-a11y.js', plugins_url( 'wp-accessibility/toolbar/js/a11y.js' ), array( 'jquery' ), '1.0', true ); 
    118     wp_register_script( 'scrollTo', plugins_url( 'wp-accessibility/toolbar/js/jquery.scrollto.min.js' ), array( 'jquery' ), '1.0', true ); 
     120    wp_register_script( 'scrollTo', plugins_url( 'wp-accessibility/toolbar/js/jquery.scrollto.min.js' ), array( 'jquery' ), '1.4.5', true ); 
    119121} 
    120122 
     
    162164    " 
    163165<script type='text/javascript'> 
    164     jQuery.noConflict(); 
    165     jQuery(document).ready(function($) { 
     166//<![CDATA[ 
     167    (function( $ ) { 'use strict'; 
    166168        // Prepend our toolbar to the left side of the page, right under <body> 
    167169        var insert_a11y_toolbar = '<!-- a11y toolbar -->'; 
     
    175177        insert_a11y_toolbar += '<!-- // a11y toolbar -->'; 
    176178        $(document).find('body').prepend(insert_a11y_toolbar); 
    177     }); 
     179    }(jQuery)); 
     180//]]> 
    178181</script>"; 
    179182} 
     
    248251        $script = " 
    249252<script> 
    250     jQuery(document).ready( function($) { 
     253//<![CDATA[ 
     254    (function( $ ) { 'use strict'; 
    251255        $skiplinks_js 
    252256        $targets 
    253257        $lang_js 
    254258        $tabindex 
    255     }); 
     259    }(jQuery)); 
     260//]]> 
    256261</script>"; 
    257262        echo $script; 
     
    456461} 
    457462function wpa_filter($query) { 
    458     // Insert the specific post type you want to search 
    459463    if ( isset($_GET['s']) && $_GET['s'] == '' ) {  
    460464        $query->query_vars['s'] = '&#32;'; 
     
    792796} 
    793797 
    794 // The built-in Recent Posts widget hard-codes title attributes. This duplicate widget doesn't. 
     798// The built-in Recent Posts widget hard-codes title attributes. This widget doesn't. 
    795799class WP_Widget_Recent_Posts_No_Title_Attributes extends WP_Widget { 
    796800 
    797 /* CHECK FOR UPGRADE CONFLICTS 
    798     function WP_Widget_Recent_Posts_No_Title_Attributes() { 
    799         $widget_ops = array('classname' => 'widget_recent_entries', 'description' => __( "The most recent posts on your blog") ); 
    800         $this->WP_Widget('recent-posts-no-title-attributes', __('WP A11y: Recent Posts','wp-accessibility'), $widget_ops); 
    801         $this->alt_option_name = 'widget_recent_entries'; 
    802     } 
    803 */ 
    804801function WP_Widget_Recent_Posts_No_Title_Attributes() { 
    805802    parent::WP_Widget( false,$name=__('WP A11Y: Recent Posts','wp-accessibility') ); 
     
    871868    } 
    872869} 
    873 function wpa_widgets_init() { 
    874     register_widget('WP_Widget_Recent_Posts_No_Title_Attributes'); 
    875 } 
    876 add_action('init', 'wpa_widgets_init', 1); 
    877  
     870 
     871add_action('widgets_init', create_function('', 'return register_widget("WP_Widget_Recent_Posts_No_Title_Attributes");') ); 
    878872 
    879873function wpa_get_support_form() { 
     
    890884    // server 
    891885    $php_version = phpversion(); 
    892      
    893     $curl_init = ( function_exists('curl_init') )?'yes':'no'; 
    894     $curl_exec = ( function_exists('curl_exec') )?'yes':'no'; 
    895886     
    896887    // theme data 
     
    932923Language: $language 
    933924Charset: $charset 
     925Admin Email: $current_user->user_email 
    934926 
    935927==Extra info:== 
     
    937929Server Software: $_SERVER[SERVER_SOFTWARE] 
    938930User Agent: $_SERVER[HTTP_USER_AGENT] 
    939 cURL Init: $curl_init 
    940 cURL Exec: $curl_exec 
    941931 
    942932==Theme:== 
Note: See TracChangeset for help on using the changeset viewer.