From 616f1e56e9a00e4bda4b46db82326cbce60fc4a7 Mon Sep 17 00:00:00 2001 From: Brian Dukes Date: Fri, 6 Jun 2014 15:17:53 -0500 Subject: [PATCH] Add PayPal's Bootstrap Accessibility plugin (v1.0.2, initial release) --- .../bootstrap.accessibility_1.0.2.zip | Bin 0 -> 6253 bytes InstallPackages/zeroclipboard_1.3.5.zip | Bin 14714 -> 14714 bytes .../bootstrap.accessibility_1.0.2/CHANGES.htm | 16 + .../bootstrap.accessibility_1.0.2/LICENSE.htm | 1 + .../Resources.zip | Bin 0 -> 515 bytes .../bootstrap-accessibility.js | 406 ++++++++++++++++++ .../bootstrap.accessibility.dnn | 45 ++ 7 files changed, 468 insertions(+) create mode 100644 InstallPackages/bootstrap.accessibility_1.0.2.zip create mode 100644 bootstrap.accessibility/bootstrap.accessibility_1.0.2/CHANGES.htm create mode 100644 bootstrap.accessibility/bootstrap.accessibility_1.0.2/LICENSE.htm create mode 100644 bootstrap.accessibility/bootstrap.accessibility_1.0.2/Resources.zip create mode 100644 bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap-accessibility.js create mode 100644 bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap.accessibility.dnn diff --git a/InstallPackages/bootstrap.accessibility_1.0.2.zip b/InstallPackages/bootstrap.accessibility_1.0.2.zip new file mode 100644 index 0000000000000000000000000000000000000000..0adce0fae7a4f65335eb261a8ebd71167560b396 GIT binary patch literal 6253 zcmZ`-Wl$VSvt49yCj=)za1Sg5f(Kn#JUC0xWfyk>1lQoM!QCxba0#wULU5M=!Gi>S zxqrTUzxVE&si~=%sXjH+eY&UWs4JtPKLG#$Sb!VBNLi*QkaQCw06f-8b>d0+sZf@z~f-pnaB3wOrtX;;bZCnTx zXC!1lGf#F1CKJyA7MW&xIBt%_M2Sn{YCF70N)JYNCvS`NG5tUz!I0JUqxmZMT@Fr0 zu!xAt3?py73D`cTZSd%nZtMcN{VKBB0mp2T=4_^+VAJ6(kr!3vuy7Xnv!JMi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r~ zNY?V3u4nirAGqP-xqrXT$l9{Dsz!kBT}&?Oeye3uti;*+*1SKD3Gp@;yxNM|_i(U= zsOppoO!&r&N^WkAv(A2$d^T+R!P20!$mMAIF0pMV*+A8|Yhx#heUy5o4EQ0rp5|;Q z{YHezw1{`|(VR=tw@~ce@itV*6CwC?Bb4QH5#s$r+k z(HF>ah(SqL&QTlDmd0<`etv{-)ur0^Ig#_MiN!X$j^`Qej|Pupm2UbWgR2yJVgy>o zq&k%@H=i=UN&pZ2#zrL-j-!_O-M-xtB|`J7NJaa%vW#oHI8IYyu@3RH=4_v>jSpE& z`g3Bup`e#SQQG`K$WzKFkAaO5$_%|KmzflRag+ZNp9{}LYuBHrx2B+U4sb<#9*zl6 zS4Kg70{H)>@jtQuNBjSU@_*v|+gJ8CNZKFa{XaPW_hb7f(7zR$zky^(|Eui$)9~L? r?{7ovKhOO~BL36x-?;y`AtTxU$^>;~AjV(Ez&~B$Pr6W&|F!xb9{y|D literal 0 HcmV?d00001 diff --git a/InstallPackages/zeroclipboard_1.3.5.zip b/InstallPackages/zeroclipboard_1.3.5.zip index c068df9a1cd3ace185566734bcc32109dfb9946e..075707e2d1dd55bd4058cbac07e5d771546457a0 100644 GIT binary patch delta 90 zcmexW^s9&`z?+#xgn@y9gW+u4MxMP~OlRXZpXS=f1fsin?Kr`Fu?0-bXXEy6&Xc?$ d2Nam>VPOuU8X?p!3ri61tA#B{(PUFgR{-1(B5?o! delta 90 zcmexW^s9&`z?+#xgn@y9gTXy?BhOwgrj?!W^h>awCvhA3AxLg(Xnc +
  • +
    Version 1.0.2
    +

    Initial release, provides accessibility for:

    +
      +
    • Alert
    • +
    • Tooltip
    • +
    • Popover
    • +
    • Modal dialog
    • +
    • Dropdown menu
    • +
    • Tab panel
    • +
    • Collapse
    • +
    • Carousel
    • +
    +
  • + \ No newline at end of file diff --git a/bootstrap.accessibility/bootstrap.accessibility_1.0.2/LICENSE.htm b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/LICENSE.htm new file mode 100644 index 00000000..090b5eff --- /dev/null +++ b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/LICENSE.htm @@ -0,0 +1 @@ +

    Copyright 2014, eBay Software Foundation under the BSD license.

    \ No newline at end of file diff --git a/bootstrap.accessibility/bootstrap.accessibility_1.0.2/Resources.zip b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/Resources.zip new file mode 100644 index 0000000000000000000000000000000000000000..825d84400a3e9293efc9b8254b853cb955d28f05 GIT binary patch literal 515 zcmWIWW@Zs#U|`^2_+{Gd@=tLClRF~=!&GJl25F#ZQht6(aY<2Pfo@`Qa%ypLW>RKO zW=W-9a&hs}Nq4gj8}PKg|18q9akrXE9Or88YVo6CQNh>wwoNXZvhVkm{TG)mWm(oe z!DIfpKpk=4qD@~{^%tCAsF}Z}P{r~06p!W?-!4Ri%uX#kvqh3CX6Kd>@k z;hKJx>vanZcGvito#bj~u4y#=b71wc`A?o0-jHm5uYB{4g?nQ)_vDP~cW-J;PFAQh z&VG?QKjY-hC)S)lAIWTqWm>+abMDdnle^}XT26ky;^vGg%NyRQ1&Nii9P-GS`Z*+F zr7zF_V=O;@q&#@t^`Jm{UCqg}^QOwYy?oh8JVQd(O`%&|vFzviD~ESZTfTkn#Z29W zTBpCC?z<4=QTb--qKY`J_D|Q?IrE*)+q)jUBbvPbTK~+fby`cY#-pw$YjreD+W}6 zaR34eU=nY9a6uI@GDt8mEa|#e9eSQIYq_BB!A1lf;LXYgGKmogbAfaNFsd0C0J6~5 A@c;k- literal 0 HcmV?d00001 diff --git a/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap-accessibility.js b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap-accessibility.js new file mode 100644 index 00000000..c43363a9 --- /dev/null +++ b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap-accessibility.js @@ -0,0 +1,406 @@ +/* ======================================================================== +* Extends Bootstrap v3.1.1 + +* Copyright (c) <2014> eBay Software Foundation + +* All rights reserved. + +* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. + +* Neither the name of eBay or any of its subsidiaries or affiliates nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. + +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +* ======================================================================== */ + +(function($) { + "use strict"; + + var uniqueId = function(prefix) { + return (prefix || 'ui-id') + '-' + Math.floor((Math.random()*1000)+1) + } + + // Alert Extension + // =============================== + + $('.alert').attr('role', 'alert') + $('.close').removeAttr('aria-hidden').wrapInner('').append('Close') + + // TOOLTIP Extension + // =============================== + + var showTooltip = $.fn.tooltip.Constructor.prototype.show + , hideTooltip = $.fn.tooltip.Constructor.prototype.hide + + $.fn.tooltip.Constructor.prototype.show = function () { + showTooltip.apply(this, arguments) + var $tip = this.tip() + , tooltipID = $tip.attr('id') || uniqueId('ui-tooltip') + $tip.attr({'role':'tooltip','id' : tooltipID}) + this.$element.attr('aria-describedby', tooltipID) + } + + $.fn.tooltip.Constructor.prototype.hide = function () { + hideTooltip.apply(this, arguments) + removeMultiValAttributes(this.$element, 'aria-describedby', this.tip().attr('id')) + return this + } + + // Popover Extension + // =============================== + var showPopover = $.fn.popover.Constructor.prototype.setContent + , hideTPopover = $.fn.popover.Constructor.prototype.hide + + $.fn.popover.Constructor.prototype.setContent = function(){ + showPopover.apply(this, arguments) + var $tip = this.tip() + , tooltipID = $tip.attr('id') || uniqueId('ui-tooltip') + $tip.attr({'role':'alert','id' : tooltipID}) + this.$element.attr('aria-describedby', tooltipID) + this.$element.focus() + } + $.fn.popover.Constructor.prototype.hide = function(){ + hideTooltip.apply(this, arguments) + removeMultiValAttributes(this.$element, 'aria-describedby', this.tip().attr('id')) + } + + //Modal Extension + $('.modal-dialog').attr( {'role' : 'document'}) + var modalhide = $.fn.modal.Constructor.prototype.hide + $.fn.modal.Constructor.prototype.hide = function(){ + var modalOpener = this.$element.parent().find('[data-target="#' + this.$element.attr('id') + '"]') + modalhide.apply(this, arguments) + modalOpener.focus() + } + + // DROPDOWN Extension + // =============================== + + var toggle = '[data-toggle=dropdown]' + , $par + , firstItem + , focusDelay = 200 + , menus = $(toggle).parent().find('ul').attr('role','menu') + , lis = menus.find('li').attr('role','presentation') + + lis.find('a').attr({'role':'menuitem', 'tabIndex':'-1'}) + $(toggle).attr({ 'aria-haspopup':'true', 'aria-expanded': 'false'}) + + $(toggle).parent().on('shown.bs.dropdown',function(e){ + $par = $(this) + var $toggle = $par.find(toggle) + $toggle.attr('aria-expanded','true') + + setTimeout(function(){ + firstItem = $('.dropdown-menu [role=menuitem]:visible', $par)[0] + try{ firstItem.focus()} catch(ex) {} + }, focusDelay) + }) + + $(toggle).parent().on('hidden.bs.dropdown',function(e){ + $par = $(this) + var $toggle = $par.find(toggle) + $toggle.attr('aria-expanded','false') + }) + + //Adding Space Key Behaviour, opens on spacebar + $.fn.dropdown.Constructor.prototype.keydown = function (e) { + var $par + , firstItem + if (!/(32)/.test(e.keyCode)) return + $par = $(this).parent() + $(this).trigger ("click") + e.preventDefault() && e.stopPropagation() + } + + $(document) + .on('focusout.dropdown.data-api', '.dropdown-menu', function(e){ + var $this = $(this) + , that = this + setTimeout(function() { + if(!$.contains(that, document.activeElement)){ + $this.parent().removeClass('open') + $this.parent().find('[data-toggle=dropdown]').attr('aria-expanded','false') + } + }, 150) + }) + .on('keydown.bs.dropdown.data-api', toggle + ', [role=menu]' , $.fn.dropdown.Constructor.prototype.keydown) + + + // Tab Extension + // =============================== + + var $tablist = $('.nav-tabs') + , $lis = $tablist.children('li') + , $tabs = $tablist.find('[data-toggle="tab"], [data-toggle="pill"]') + + $tablist.attr('role', 'tablist') + $lis.attr('role', 'presentation') + $tabs.attr('role', 'tab') + + $tabs.each(function( index ) { + var tabpanel = $($(this).attr('href')) + , tab = $(this) + , tabid = tab.attr('id') || uniqueId('ui-tab') + + tab.attr('id', tabid) + + if(tab.parent().hasClass('active')){ + tab.attr( { 'tabIndex' : '0', 'aria-expanded' : 'true', 'aria-selected' : 'true', 'aria-controls': tab.attr('href').substr(1) } ) + tabpanel.attr({ 'role' : 'tabpanel', 'tabIndex' : '0', 'aria-hidden' : 'false', 'aria-labelledby':tabid }) + }else{ + tab.attr( { 'tabIndex' : '-1', 'aria-expanded' : 'false', 'aria-selected' : 'false', 'aria-controls': tab.attr('href').substr(1) } ) + tabpanel.attr( { 'role' : 'tabpanel', 'tabIndex' : '-1', 'aria-hidden' : 'true', 'aria-labelledby':tabid } ) + } + }) + + $.fn.tab.Constructor.prototype.keydown = function (e) { + var $this = $(this) + , $items + , $ul = $this.closest('ul[role=tablist] ') + , index + , k = e.which || e.keyCode + + $this = $(this) + if (!/(37|38|39|40)/.test(k)) return + + $items = $ul.find('[role=tab]:visible') + index = $items.index($items.filter(':focus')) + + if (k == 38 || k == 37) index-- // up & left + if (k == 39 || k == 40) index++ // down & right + + + if(index < 0) index = $items.length -1 + if(index == $items.length) index = 0 + + var nextTab = $items.eq(index) + if(nextTab.attr('role') ==='tab'){ + + nextTab.tab('show') //Comment this line for dynamically loaded tabPabels, to save Ajax requests on arrow key navigation + .focus() + } + // nextTab.focus() + + e.preventDefault() + e.stopPropagation() + } + + $(document).on('keydown.tab.data-api','[data-toggle="tab"], [data-toggle="pill"]' , $.fn.tab.Constructor.prototype.keydown) + + var tabactivate = $.fn.tab.Constructor.prototype.activate; + $.fn.tab.Constructor.prototype.activate = function (element, container, callback) { + var $active = container.find('> .active') + $active.find('[data-toggle=tab]').attr({ 'tabIndex' : '-1','aria-selected' : false,'aria-expanded' : false }) + $active.filter('.tab-pane').attr({ 'aria-hidden' : true,'tabIndex' : '-1' }) + + tabactivate.apply(this, arguments) + + element.addClass('active') + element.find('[data-toggle=tab]').attr({ 'tabIndex' : '0','aria-selected' : true,'aria-expanded' : true }) + element.filter('.tab-pane').attr({ 'aria-hidden' : false,'tabIndex' : '0' }) + } + + + // Collapse Extension + // =============================== + + var $colltabs = $('[data-toggle="collapse"]') + $colltabs.attr({ 'role':'tab', 'aria-selected':'false', 'aria-expanded':'false' }) + $colltabs.each(function( index ) { + var colltab = $(this) + , collpanel = (colltab.attr('data-target')) ? $(colltab.attr('data-target')) : $(colltab.attr('href')) + , parent = colltab.attr('data-parent') + , collparent = parent && $(parent) + , collid = colltab.attr('id') || uniqueId('ui-collapse') + + $(collparent).find('div:not(.collapse,.panel-body), h4').attr('role','presentation') + + colltab.attr('id', collid) + if(collparent){ + collparent.attr({ 'role' : 'tablist', 'aria-multiselectable' : 'true' }) + if(collpanel.hasClass('in')){ + colltab.attr({ 'aria-controls': colltab.attr('href').substr(1), 'aria-selected':'true', 'aria-expanded':'true', 'tabindex':'0' }) + collpanel.attr({ 'role':'tabpanel', 'tabindex':'0', 'aria-labelledby':collid, 'aria-hidden':'false' }) + }else{ + colltab.attr({'aria-controls' : colltab.attr('href').substr(1), 'tabindex':'-1' }) + collpanel.attr({ 'role':'tabpanel', 'tabindex':'-1', 'aria-labelledby':collid, 'aria-hidden':'true' }) + } + } + }) + + var collToggle = $.fn.collapse.Constructor.prototype.toggle + $.fn.collapse.Constructor.prototype.toggle = function(){ + var prevTab = this.$parent && this.$parent.find('[aria-expanded="true"]') , href + + if(prevTab){ + var prevPanel = prevTab.attr('data-target') || (href = prevTab.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') + , $prevPanel = $(prevPanel) + , $curPanel = this.$element + , par = this.$parent + , curTab + + if (this.$parent) curTab = this.$parent.find('[data-toggle=collapse][href="#' + this.$element.attr('id') + '"]') + + collToggle.apply(this, arguments) + + if ($.support.transition) { + this.$element.one($.support.transition.end, function(){ + + prevTab.attr({ 'aria-selected':'false','aria-expanded':'false', 'tabIndex':'-1' }) + $prevPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1'}) + + curTab.attr({ 'aria-selected':'true','aria-expanded':'true', 'tabIndex':'0' }) + + if($curPanel.hasClass('in')){ + $curPanel.attr({ 'aria-hidden' : 'false','tabIndex' : '0' }) + }else{ + curTab.attr({ 'aria-selected':'false','aria-expanded':'false'}) + $curPanel.attr({ 'aria-hidden' : 'true','tabIndex' : '-1' }) + } + }) + } + }else{ + collToggle.apply(this, arguments) + } + } + + $.fn.collapse.Constructor.prototype.keydown = function (e) { + var $this = $(this) + , $items + , $tablist = $this.closest('div[role=tablist] ') + , index + , k = e.which || e.keyCode + + $this = $(this) + if (!/(32|37|38|39|40)/.test(k)) return + if(k==32) $this.click() + + $items = $tablist.find('[role=tab]') + index = $items.index($items.filter(':focus')) + + if (k == 38 || k == 37) index-- // up & left + if (k == 39 || k == 40) index++ // down & right + if(index < 0) index = $items.length -1 + if(index == $items.length) index = 0 + + $items.eq(index).focus() + + e.preventDefault() + e.stopPropagation() + + } + + $(document).on('keydown.collapse.data-api','[data-toggle="collapse"]' , $.fn.collapse.Constructor.prototype.keydown) + + // Carousel Extension + // =============================== + + $('.carousel').each(function (index) { + var $this = $(this) + , prev = $this.find('[data-slide="prev"]') + , next = $this.find('[data-slide="next"]') + , $options = $this.find('.item') + , $listbox = $options.parent() + + $this.attr( { 'data-interval' : 'false', 'data-wrap' : 'false' } ) + $listbox.attr('role', 'listbox') + $options.attr('role', 'option') + + var spanPrev = document.createElement('span') + spanPrev.setAttribute('class', 'sr-only') + spanPrev.innerHTML='Previous' + + var spanNext = document.createElement('span') + spanNext.setAttribute('class', 'sr-only') + spanNext.innerHTML='Next' + + prev.attr('role', 'button') + next.attr('role', 'button') + + prev.append(spanPrev) + next.append(spanNext) + + $options.each(function () { + var item = $(this) + if(item.hasClass('active')){ + item.attr({ 'aria-selected': 'true', 'tabindex' : '0' }) + }else{ + item.attr({ 'aria-selected': 'false', 'tabindex' : '-1' }) + } + }) + }) + + var slideCarousel = $.fn.carousel.Constructor.prototype.slide + $.fn.carousel.Constructor.prototype.slide = function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + + slideCarousel.apply(this, arguments) + + $active + .one($.support.transition.end, function () { + $active.attr({'aria-selected':false, 'tabIndex': '-1'}) + $next.attr({'aria-selected':true, 'tabIndex': '0'}) + //.focus() + }) + } + + $.fn.carousel.Constructor.prototype.keydown = function (e) { + var $this = $(this) + , $ul = $this.closest('div[role=listbox]') + , $items = $ul.find('[role=option]') + , $parent = $ul.parent() + , k = e.which || e.keyCode + , index + , i + + if (!/(37|38|39|40)/.test(k)) return + + index = $items.index($items.filter('.active')) + if (k == 37 || k == 38) { // Up + $parent.carousel('prev') + index-- + if(index < 0) index = $items.length -1 + else $this.prev().focus() + + } + if (k == 39 || k == 40) { // Down + $parent.carousel('next') + index++ + if(index == $items.length) index = 0 + else { + $this.one($.support.transition.end, function () { + $this.next().focus() + }) + } + + } + + e.preventDefault() + e.stopPropagation() + } + $(document).on('keydown.carousel.data-api', 'div[role=option]', $.fn.carousel.Constructor.prototype.keydown) + + // GENERAL UTILITY FUNCTIONS + // =============================== + + var removeMultiValAttributes = function (el, attr, val) { + var describedby = (el.attr( attr ) || "").split( /\s+/ ) + , index = $.inArray(val, describedby) + if ( index !== -1 ) { + describedby.splice( index, 1 ) + } + describedby = $.trim( describedby.join( " " ) ) + if (describedby ) { + el.attr( attr, describedby ) + } else { + el.removeAttr( attr ) + } + } + + +})(jQuery); diff --git a/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap.accessibility.dnn b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap.accessibility.dnn new file mode 100644 index 00000000..3abf47b2 --- /dev/null +++ b/bootstrap.accessibility/bootstrap.accessibility_1.0.2/bootstrap.accessibility.dnn @@ -0,0 +1,45 @@ + + + + Bootstrap Accessibility Plugin + http://paypal.github.io/bootstrap-accessibility-plugin/demo.html]]> + + Engage Software + Engage Software + http://www.engagesoftware.com + support@engagesoftware.com + + + + true + + jQuery + + + + + bootstrap.accessibility + bootstrap-accessibility.js + BodyBottom + + + + + bootstrap.accessibility + + bootstrap-accessibility.js + + + + + + Resources\Libraries\bootstrap.accessibility\1.0.2 + + Resources.zip + + + + + + + \ No newline at end of file