Skip to content

Commit 230b297

Browse files
donroycojosephperrott
authored andcommitted
fix(dialog): change order of button actions (#9021)
1 parent 0c26ddb commit 230b297

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/demo-app/a11y/dialog/dialog-address-form-a11y.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ <h2 mat-dialog-title>Company</h2>
4040
</mat-dialog-content>
4141

4242
<mat-dialog-actions>
43-
<button mat-raised-button color="primary" mat-dialog-close>Submit</button>
4443
<button mat-raised-button mat-dialog-close>Close</button>
44+
<button mat-raised-button color="primary" mat-dialog-close cdkFocusInitial>Submit</button>
4545
</mat-dialog-actions>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<h2 mat-dialog-title>Fruit</h2>
22
<div mat-dialog-content>Which would you like to choose?</div>
33
<div mat-dialog-actions>
4-
<button mat-button mat-dialog-close="apple" aria-label="Apple">Apple</button>
54
<button mat-button mat-dialog-close="peach" aria-label="Peach">Peach</button>
5+
<button mat-button mat-dialog-close="apple" aria-label="Apple">Apple</button>
66
</div>

src/material-examples/dialog-content/dialog-content-example-dialog.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ <h3>DEVELOP ACROSS ALL PLATFORMS</h3>
44
<p>Learn one way to build applications with Angular and reuse your code and abilities to build
55
apps for any deployment target. For web, mobile web, native mobile and native desktop.</p>
66

7-
<h3>SPEED & PERFORMANCE</h3>
7+
<h3>SPEED &amp; PERFORMANCE</h3>
88
<p>Achieve the maximum speed possible on the Web Platform today, and take it further, via Web
99
Workers and server-side rendering. Angular puts you in control over scalability. Meet huge data requirements
1010
by building data models on RxJS, Immutable.js or another push-model.</p>
@@ -20,6 +20,6 @@ <h3>LOVED BY MILLIONS</h3>
2020
that supports Google's largest applications.</p>
2121
</mat-dialog-content>
2222
<mat-dialog-actions>
23-
<button mat-button [mat-dialog-close]="true" tabindex="1">Install</button>
24-
<button mat-button mat-dialog-close tabindex="-1">Cancel</button>
23+
<button mat-button mat-dialog-close>Cancel</button>
24+
<button mat-button [mat-dialog-close]="true" cdkFocusInitial>Install</button>
2525
</mat-dialog-actions>

src/material-examples/dialog-overview/dialog-overview-example-dialog.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ <h1 mat-dialog-title>Hi {{data.name}}</h1>
66
</mat-form-field>
77
</div>
88
<div mat-dialog-actions>
9-
<button mat-button [mat-dialog-close]="data.animal" tabindex="2">Ok</button>
10-
<button mat-button (click)="onNoClick()" tabindex="-1">No Thanks</button>
9+
<button mat-button (click)="onNoClick()">No Thanks</button>
10+
<button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button>
1111
</div>

0 commit comments

Comments
 (0)