-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
fix(dialog): change order of button actions #9021
fix(dialog): change order of button actions #9021
Conversation
<button mat-button (click)="onNoClick()" tabindex="-1">No Thanks</button> | ||
<button mat-button [mat-dialog-close]="data.animal" tabindex="2">Ok</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not something that you added, but while we're at it, can you remove the tabindex
from the buttons here and in the other example and replace the positive tabindex
with an cdk-focus-initial
attribute?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do @crisbeto, is there an attribute order? <button mat-button cdk-focus-initial [mat-dialog-close]="true">
or <button mat-button [mat-dialog-close]="true" cdk-focus-initial>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any rules for the attribute order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok!
<button mat-raised-button mat-dialog-close>Close</button> | ||
<button mat-raised-button color="primary" mat-dialog-close>Submit</button> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the attribute to this one as well? Also sorry, but I just remembered that we deprecated cdk-focus-initial
. cdkFocusInitial
is the proper one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No problem at all
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Change order of buttons for affirmative actions, according to Material guidelines. This fixes #9019