-
Notifications
You must be signed in to change notification settings - Fork 2.1k
fix(switch): handle aria-checked correctly. (#5202) #5357
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5357 +/- ##
==========================================
+ Coverage 97.63% 97.71% +0.08%
==========================================
Files 163 163
Lines 6293 6299 +6
Branches 857 857
==========================================
+ Hits 6144 6155 +11
+ Misses 149 144 -5
Continue to review full report at Codecov.
|
All 728 screenshot tests passed for commit e91ae6f vs. |
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!
All 728 screenshot tests passed for commit e91ae6f vs. |
All 728 screenshot tests passed for commit 186537e vs. |
All 728 screenshot tests passed for commit 98e2827 vs. |
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.
Since this change introduces new adapter method this is a breaking changes.
You would need to add BREAKING CHANGE: <description_of_breaking_change>
line to PR description and also in commit description for CHANGELOG.
Thanks!
packages/mdc-switch/adapter.ts
Outdated
@@ -48,4 +48,9 @@ export interface MDCSwitchAdapter { | |||
* Sets the disabled state of the native HTML control underlying the switch. | |||
*/ | |||
setNativeControlDisabled(disabled: boolean): void; | |||
|
|||
/** | |||
* Set an attribute value of the native HTML control underlying the switch. |
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.
Make sure you sync-in all the changes from your CL. :)
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.
Yes, I remember that MDC Web is not synced yet, so added commit with typo fix. Thank you!
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.
Added to PR description and to commit.
BREAKING CHANGE: Added setNativeControlAttr method in mdc-switch adapter.
2659b45
to
0c0fc2c
Compare
All 728 screenshot tests passed for commit 2659b45 vs. |
All 728 screenshot tests passed for commit 0c0fc2c vs. |
Handle aria-checked attribute on MDC Web level, so developers should not implement this logic.
Aria checked is required for
role="switch"
elements.In addition after this fix MDC Web catalog website should be updated.
Closes #5202
BREAKING CHANGE: Added
setNativeControlAttr
method inmdc-switch
adapter.