-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(material/progress-bar): Support ChromeVox (#22166)
* fix(material/progress-bar): Support ChromeVox * refactor(material/progress-bar): wrap elements with aria-hidden div * fix(material-experimental/mdc-progress-bar): Support ChromeVox #22165 * test(material/progress-bar): add ChromeVox support tests * test(material-experimental/mdc-progress-bar): add ChromeVox support test (cherry picked from commit 5b7b03e)
- Loading branch information
1 parent
1039b40
commit f950c03
Showing
4 changed files
with
50 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,21 @@ | ||
<!-- | ||
The background div is named as such because it appears below the other divs and is not sized based | ||
on values. | ||
All children need to be hidden for screen readers in order to support ChromeVox. | ||
More context in the issue: https://github.com/angular/components/issues/22165. | ||
--> | ||
<svg width="100%" height="4" focusable="false" class="mat-progress-bar-background mat-progress-bar-element"> | ||
<defs> | ||
<pattern [id]="progressbarId" x="4" y="0" width="8" height="4" patternUnits="userSpaceOnUse"> | ||
<circle cx="2" cy="2" r="2"/> | ||
</pattern> | ||
</defs> | ||
<rect [attr.fill]="_rectangleFillValue" width="100%" height="100%"/> | ||
</svg> | ||
<div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div> | ||
<div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()" #primaryValueBar></div> | ||
<div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div> | ||
<div aria-hidden="true"> | ||
<svg width="100%" height="4" focusable="false" class="mat-progress-bar-background mat-progress-bar-element"> | ||
<defs> | ||
<pattern [id]="progressbarId" x="4" y="0" width="8" height="4" patternUnits="userSpaceOnUse"> | ||
<circle cx="2" cy="2" r="2"/> | ||
</pattern> | ||
</defs> | ||
<rect [attr.fill]="_rectangleFillValue" width="100%" height="100%"/> | ||
</svg> | ||
<!-- | ||
The background div is named as such because it appears below the other divs and is not sized based | ||
on values. | ||
--> | ||
<div class="mat-progress-bar-buffer mat-progress-bar-element" [ngStyle]="_bufferTransform()"></div> | ||
<div class="mat-progress-bar-primary mat-progress-bar-fill mat-progress-bar-element" [ngStyle]="_primaryTransform()" #primaryValueBar></div> | ||
<div class="mat-progress-bar-secondary mat-progress-bar-fill mat-progress-bar-element"></div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters