UNPKG

jquery.a11ybutton

Version:

When you intend to use a button in your HTML use a button, not a div, span, or anchor. However, if you can't use this plugin.

2 lines 490 B
/*! jquery.a11ybutton */ !function(a){function b(b,c){this.element=b,this.options=a.extend({},h,c),this.init()}var c="a11yButton",d="plugin_",e="tabindex",f="role",g="button",h={};b.prototype={init:function(){var b=a(this.element);this.addButtonToTabOrder(b),this.addARIARole(b)},addButtonToTabOrder:function(a){a.attr(e,"0")},addARIARole:function(a){a.attr(f,g)}},a.fn[c]=function(e){return this.each(function(){a.data(this,d+c)||a.data(this,d+c,new b(this,e))})}}(jQuery,window,document);