-
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
Add label elements to scheduler and visibility #3317
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3317 +/- ##
==========================================
+ Coverage 31.17% 31.56% +0.38%
==========================================
Files 235 238 +3
Lines 6534 6688 +154
Branches 1163 1199 +36
==========================================
+ Hits 2037 2111 +74
- Misses 3773 3847 +74
- Partials 724 730 +6
Continue to review full report at Codecov.
|
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.
Looks good 👍
Sorry I'm not sure I understand why we should use label element associated to buttons. What is the reasoning behind this change? While, technically, buttons are labelable elements, now clicking these new labels will activate the buttons making the popovers appear. This could be confusing for users. Not to mention the buttons accessible name is now calculated based on the new labels and the buttons text, highly confusing for assistive technologies users: About these two buttons, see also "Controls labels should be meaningful even when read out of context" #470. The current practice to name the buttons with the current value of their underlying options rather than with the name of the available action is far from ideal. |
This is what seemed sensible to me in my review, considering the behavior of labels in activating other types of form control (checkbox, radio). I do not feel strongly here and am happy to reverse these changes if this is not the case.
Is this a result of the changes here, or to the general point raised in #470 that the buttons lack context? Is there any way for the relationship between a label and the button to be leveraged in screen readers to lend clarity here (i.e. Visibility -> Public, Publish -> November 6)? |
The primary purpose of a label is giving controls a name. For example, an input field may use an "Email" label. The interaction (clicking on the label focus/checks the control) is a secondary effect. What happens here is the label contributes to the calculation of the control accessible name. Labels should be meaningful even when read out of context. Users can jump directly to one of these buttons and what they would here would be something like: Buttons should identify the underlying action. For example, would you give a form submit button a text "Send on November 6, 2017 10:47 pm"? Certainly not. You would likely just describe the button action: "Submit". In this case, for example, "Private Visibility" would make me think that activating the button I set Visibility to Private. Highly confusing for users. This actually increases the confusion caused by giving the buttons a name that is not the available action but the current setting value, as described on #470 and doesn't help to solve the issue. I'd recommend to reconsider this change. |
I wanted to make it more consistent with the labels. But your explanation makes it clear why it doesn't become more user-friendly. Thank you, I have learned something new and will think about it next time. We should therefore reverse this change here. |
Thanks @Soean ! |
Description
Changes the html element of the sidebar panel name for
post-schedule
andpost-visibility
from span to label. It also adds an ID for better accessibility.Separated from #3188