Accessibility: Spacer Block's
width attribute accepts and saves negative value
#68847
Open
3 of 6 tasks
Labels
[Type] Bug
An existing feature does not function as intended
Description
This was first discovered here #68817 (comment).
The following are some inconsistencies observed in the
width control
:The width control does not enforce a minimum value, allowing users to set it below 0 using keyboard shortcuts (
cmd + arrow keys
) or scrolling (cmd + mouse wheel
). Negative values for width are not meaningful in this context, and the input should be restricted to a minimum value of 0.It is currently possible to enter a negative width value and save it, which is not consistent with expected behavior.
Other controls, such as the font size and height controls, handle negative values more effectively:
cmd + arrow keys
) or mouse scrolling (cmd + mouse wheel
).I'm not sure if this was raised earlier elsewhere (couldn't find it), if so, please feel free to close this issue.
Step-by-step reproduction instructions
row block
.spacer block
inside it.width
can go below 0 usingcmd + arrow keys
orcmd + mouse wheel
.width
as a negative value, it does not become 0 on either saving or removing the focus from the input.Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Please confirm which theme type you used for testing.
The text was updated successfully, but these errors were encountered: