Skip to content

Commit 913046b

Browse files
committed
fix(material/progress-spinner): fix screenreader not reading out aria-label
1 parent b027279 commit 913046b

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

src/material-experimental/mdc-progress-bar/progress-bar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export type ProgressBarMode = 'determinate' | 'indeterminate' | 'buffer' | 'quer
5050
'role': 'progressbar',
5151
'aria-valuemin': '0',
5252
'aria-valuemax': '100',
53+
'tabindex': '-1',
5354
'[attr.aria-valuenow]': '(mode === "indeterminate" || mode === "query") ? null : value',
5455
'[attr.mode]': 'mode',
5556
'class': 'mat-mdc-progress-bar',

src/material-experimental/mdc-progress-spinner/progress-spinner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ const BASE_STROKE_WIDTH = 10;
5858
host: {
5959
'role': 'progressbar',
6060
'class': 'mat-mdc-progress-spinner mdc-circular-progress',
61+
'tabindex': '-1',
6162
'[class._mat-animation-noopable]': `_noopAnimations`,
6263
'[style.width.px]': 'diameter',
6364
'[style.height.px]': 'diameter',

src/material/progress-bar/progress-bar.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ let progressbarId = 0;
9292
'role': 'progressbar',
9393
'aria-valuemin': '0',
9494
'aria-valuemax': '100',
95+
'tabindex': '-1',
9596
'[attr.aria-valuenow]': '(mode === "indeterminate" || mode === "query") ? null : value',
9697
'[attr.mode]': 'mode',
9798
'class': 'mat-progress-bar',

src/material/progress-spinner/progress-spinner.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ const INDETERMINATE_ANIMATION_TEMPLATE = `
109109
host: {
110110
'role': 'progressbar',
111111
'class': 'mat-progress-spinner',
112+
'tabindex': '-1',
112113
'[class._mat-animation-noopable]': `_noopAnimations`,
113114
'[style.width.px]': 'diameter',
114115
'[style.height.px]': 'diameter',

0 commit comments

Comments
 (0)