-
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
Issue #6001 - remove label in the shortcode block #6033
Issue #6001 - remove label in the shortcode block #6033
Conversation
@@ -66,10 +66,6 @@ export const settings = { | |||
|
|||
return ( | |||
<div className="wp-block-shortcode"> | |||
<label htmlFor={ inputId }> |
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 believe there's some CSS we can remove as well.
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.
👍 Seems reasonable to me but I've flagged for a second review.
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.
Code looks good, just waiting for a design check @karmatosed @jasmussen to approve.
If I got it correctly, this PR removes the |
@afercia Can you suggest how the PR should be updated to include the label in the correct manner? |
@danielbachhuber I need a few minutes to finish something and switch VVV installation. In the meantime, Id suggest everyone to not think just visually. Labels are meant to give UI controls and form fields an
|
Good catch @afercia I believe this could be replaced with an |
Noting that I polished the shortcode block, including the label, in #5605 I will rebase off whatever happens in this PR, but figured I'd share the work in progress. |
@youknowriad unfortunately an On other controls, e.g. the icon buttons, we're exposing the accessible name given by On a form field we can't use a tooltip, I guess 🙂 There should always be a visible label that matches the accessible name. In this specific case, I'd keep the previous label. Maybe I'd consider to move it above the field, so the field can be full width. In other cases, for example the post title, we're using a visually hidden The most simple thing in this case is to keep the label. Removing it is definitely an accessibility regression compared to the previous implementation. |
The outer div for the shortcode block already has an Does that mean that the Strip away the CSS padding around the text field and visually the blocks are very similar. Perhaps I'll learn something at #wcldn on Contributor day. If I don't then my Countdown and CSV blocks, both shown above, will fail the test. |
The outer div is going to change in #5709 ad needs an aria-abel because it's focusable, and it will have a proper ARIA role. |
Closing per #6033 (comment)
|
Description
Removes the Label from inside the shortcode block.
How Has This Been Tested?
Manually.
Screenshots (jpeg or gifs if applicable):
Types of changes
I deleted some code.
Checklist: