Skip to content

fix(progress-spinner): prevent users from tabbing into underlying SVG on IE #6142

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 1, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/lib/progress-spinner/progress-spinner.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<!--
preserveAspectRatio of xMidYMid meet as the center of the viewport is the circle's
center. The center of the circle will remain at the center of the md-progress-spinner
element containing the SVG.
element containing the SVG. `focusable="false"` prevents IE from allowing the user to
tab into the SVG element.
-->
<svg viewBox="0 0 100 100"
preserveAspectRatio="xMidYMid meet">
preserveAspectRatio="xMidYMid meet"
focusable="false">
<path #path [style.strokeWidth]="strokeWidth"></path>
</svg>
8 changes: 8 additions & 0 deletions src/lib/progress-spinner/progress-spinner.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,14 @@ describe('MdProgressSpinner', () => {
.toBe(oldDimesions, 'Expected circle dimensions to have changed.');
});

it('should remove the underlying SVG element from the tab order explicitly', () => {
const fixture = TestBed.createComponent(BasicProgressSpinner);

fixture.detectChanges();

expect(fixture.nativeElement.querySelector('svg').getAttribute('focusable')).toBe('false');
});

});


Expand Down