From d931318aaf025ff8e0c608543f2dd18fbf4c8501 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 6 Oct 2015 20:39:48 +0200 Subject: [PATCH] Added role=slider for better accessibility. --- src/rzslider.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/rzslider.js b/src/rzslider.js index 59e3a39..b3acb8e 100644 --- a/src/rzslider.js +++ b/src/rzslider.js @@ -284,6 +284,7 @@ function throttle(func, wait, options) { self = this; this.initElemHandles(); + this.addAccessibility(); this.calcViewDimensions(); this.setMinAndMax(); @@ -587,6 +588,18 @@ function throttle(func, wait, options) { this.selBar.addClass('rz-draggable'); } }, + + /** + * Adds accessibility atributes + * + * Run only once during initialization + * + * @returns {undefined} + */ + addAccessibility: function () + { + this.sliderElem.attr("role", "slider"); + }, /** * Calculate dimensions that are dependent on view port size