-
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
Shared block form: add missing label. #6206
Conversation
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.
Visually I think having on 2 lines is an issue. Is it an issue to have this as the placeholder as we have in other areas? I am asking just incase that's an option. It it is not an option, can we consider other options here? What are our options?
@karmatosed I've explained why the labels must be preferably visible 🙂 that's of fundamental importance for speech recognition software users, and benefits all users. Have you checked the video by Eric Wright @ewaccess published on https://make.wordpress.org/accessibility/2018/03/28/accessibility-of-gutenberg-the-state-of-play/ ? That's very enlightening. Also, you're probably already aware that placeholders shouldn't be used as replacement for labels. As accessibility team, we're trying to communicate this since a looong time. See the related Trac ticket https://core.trac.wordpress.org/ticket/40331 I'd greatly prefer to keep it visible and avoid hacks. When you have a chance, could you please argument a bit why this is a design issue in your opinion? I've given a few important a11y argumentations here but from a design perspective I've heard just I'd also like to encourage everyone to make an effort to go beyond what are our personal perceived visual taste and gut impressions. That's very subjective, while a11y is not: there are rules to meet. |
The a11y rule is to have a label, it can be hidden as a tradeoff. We can add an |
@youknowriad that's not 100% correct 🙂 H44: Using label elements to associate text labels with form controls
It is true we're visually hiding labels in some cases, and that's already a big trade-off I'd like to use only when strictly necessary. For example, we're doing it for the post title, where I understand a visible label would be ugly. Same for all the icon buttons, but at least we're using tooltips. In all the other cases where there are input fields, I'd strongly recommend to always use visible labels unless that has really disruptive effects on the UI. Worth reminding that in this case, the form is displayed only when editing so the in its normal state the UI is as "clean" as possible. When editing, the UI adds the necessary information to make the form accessible. |
Would my ask of floating it to one side be considered a negative? I'm not seeing that mentioned so checking. There are a number of issues right now:
I really am right now trying to find the edges of this to work out a solution. |
4a74d3c
to
e84ac38
Compare
Moved label on the left (see screenshot above) and rebased to solve conflict. |
3b269e1
to
4ae3479
Compare
Rebased to solve conflict. I'd greatly appreciate a quick check, the label is now placed on the left as in the screenshot above. At the 960px media query it switches to a vertically stacked layout. @karmatosed |
@afercia My only slight hesitance is on a single word as it can read like a command, but in this case I think 👍 let's go with it. |
Label and default field value updated as in the last screenshot. Builds finally pass. Going to merge. |
* Shared block form: add missing label. * Move label to the left and implement responsive view. * Min-width is more appropriat with flexbox. * Remove widths and use flex shorthand property. * Switch to responsive view earlier. * Update label and default shared block name.
This PR adds a missing
<label>
element to the Shared block form. It does it in the simpler way, just adding a visible<label>
so there's also a minor visual change:Rationale:
Fixes #6199