Permalink
Browse files

feat(checkbox): accessibility

  • Loading branch information...
ZHollingshead committed Apr 14, 2017
1 parent fbcf50b commit 35046640c8f453e837c5504c6ccd02d7eb14e33a
Showing with 3 additions and 1 deletion.
  1. +1 −1 src/checkbox/ux-checkbox.html
  2. +2 −0 src/checkbox/ux-checkbox.ts
@@ -1,4 +1,4 @@
-<template styles.checkbox>
+<template role="checkbox" styles.checkbox>
<require from="./ux-checkbox-theme"></require>
<div class="box" click.trigger="toggleCheckbox()">
@@ -53,8 +53,10 @@ export class UxCheckbox implements Themable {
if (isChecked) {
this.element.classList.add('checked');
+ this.element.setAttribute('aria-checked', 'true');
} else {
this.element.classList.remove('checked');
+ this.element.setAttribute('aria-checked', 'false');
}
}

0 comments on commit 3504664

Please sign in to comment.