Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 96d37a6

Browse files
committed
Merge pull request angular-slider#141 from Myoxocephalus/master
Added role=slider for better accessibility.
2 parents acde0f8 + d931318 commit 96d37a6

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/rzslider.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ function throttle(func, wait, options) {
284284
self = this;
285285

286286
this.initElemHandles();
287+
this.addAccessibility();
287288
this.calcViewDimensions();
288289
this.setMinAndMax();
289290

@@ -587,6 +588,18 @@ function throttle(func, wait, options) {
587588
this.selBar.addClass('rz-draggable');
588589
}
589590
},
591+
592+
/**
593+
* Adds accessibility atributes
594+
*
595+
* Run only once during initialization
596+
*
597+
* @returns {undefined}
598+
*/
599+
addAccessibility: function ()
600+
{
601+
this.sliderElem.attr("role", "slider");
602+
},
590603

591604
/**
592605
* Calculate dimensions that are dependent on view port size

0 commit comments

Comments
 (0)