Skip to content

Commit 735ffb5

Browse files
crisbetotinayuangao
authored andcommitted
fix(checkbox): remove checkmark from tab order (#6137)
Prevents users from being able to tab into the underlying SVG checkmark on IE. Fixes #6125.
1 parent a503e19 commit 735ffb5

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/lib/checkbox/checkbox.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
<div class="mat-checkbox-frame"></div>
2323
<div class="mat-checkbox-background">
2424
<svg version="1.1"
25+
focusable="false"
2526
class="mat-checkbox-checkmark"
2627
xmlns="http://www.w3.org/2000/svg"
2728
viewBox="0 0 24 24"

src/lib/checkbox/checkbox.spec.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,10 @@ describe('MdCheckbox', () => {
404404
.toBe(0, 'Expected no ripple after element is blurred.');
405405
}));
406406

407+
it('should remove the SVG checkmark from the tab order', () => {
408+
expect(checkboxNativeElement.querySelector('svg')!.getAttribute('focusable')).toBe('false');
409+
});
410+
407411
describe('ripple elements', () => {
408412

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

0 commit comments

Comments
 (0)