Aria Switch

HTML
<input type="checkbox" data-bind="checked:Mycheckbox,attr:{'aria-label':MyAriaLabel}" > <span data-bind="text:MyAriaLabel"></span>
CSS
table thead tr>th{ padding:10px; }
JAVASCRIPT
$(function () { var MainViewModel = function () { var self = this; self.MyAriaLabel = ko.observable('aria-lebel'); self.Mycheckbox = ko.observable(); self.Mycheckbox.subscribe(function(newVal){ self.MyAriaLabel(newVal?'Something' : 'Something else'); }) } ko.applyBindings(new MainViewModel()); })
Expand for more options Login