-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Widget Editor: Don't disable the Save button #58365
Conversation
Size Change: -4 B (0%) Total Size: 1.7 MB
ℹ️ View Unchanged
|
@@ -26,9 +26,8 @@ function SaveButton() { | |||
<Button | |||
variant="primary" | |||
isBusy={ isSaving } | |||
aria-disabled={ isSaving } | |||
aria-disabled={ isSaving || ! hasEditedWidgetAreaIds } | |||
onClick={ isSaving ? undefined : saveEditedWidgetAreas } |
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.
I think the condition here also needs to be updated. A user should not be able to click on the button when ! hasEditedWidgetAreaIds
.
PS. We should probably define isDisabled
condition.
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.
Thanks for the review! I updated via 16282ad, does this make sense?
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.
@Mamaduka @draganescu Thanks for the review! It seems that React Native E2E Tests are also failing on trunk, so I would like to update and merge this PR after that issue is resolved. |
Similar to #42842
What?
PR removes the
disabled
attribute from the Widget Editor's save button component.Why?
#42802 about the Site editor explains why having both disabled and aria-disabled is a problem.
How?
Moved the variable that defines whether the
disabled
attribute is enabled to thearia-disabled
attribute and removed thedisabled
attribute.Testing Instructions
disabled
attribute andaria-disabled
should betrue
.disabled
attribute andaria-disabled
should befalse
.disabled
attribute andaria-disabled
should betrue
.Screenshots or screencast
26a145cabff808e2e5dc2abc706f09dd.mp4