Skip to content

Commit

Permalink
fix(checkbox): remove checkmark from tab order (#6137)
Browse files Browse the repository at this point in the history
Prevents users from being able to tab into the underlying SVG checkmark on IE.

Fixes #6125.
  • Loading branch information
crisbeto authored and tinayuangao committed Aug 1, 2017
1 parent a503e19 commit 735ffb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/lib/checkbox/checkbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<div class="mat-checkbox-frame"></div>
<div class="mat-checkbox-background">
<svg version="1.1"
focusable="false"
class="mat-checkbox-checkmark"
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
Expand Down
4 changes: 4 additions & 0 deletions src/lib/checkbox/checkbox.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,10 @@ describe('MdCheckbox', () => {
.toBe(0, 'Expected no ripple after element is blurred.');
}));

it('should remove the SVG checkmark from the tab order', () => {
expect(checkboxNativeElement.querySelector('svg')!.getAttribute('focusable')).toBe('false');
});

describe('ripple elements', () => {

it('should show ripples on label mousedown', () => {
Expand Down

0 comments on commit 735ffb5

Please sign in to comment.