-
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
The HeightControl is unlabeled #57681
Comments
While the fix is trivial, this bug proves yet one more time that:
Besides making Gutenberg not accessible, I would like to remind the editor packages are public and used also outside of the Gutenberg project (at least potentially). As such, releasing components that are open to misuse doesn't contribute to make the Web a better place. Rather, it makes it worse. |
CC: @annezazu . I think we're reaching a point with this where it needs to have a wider discussion with leadership. I don't wish to offend anyone in the project but Andrea is right. These components can be used outside of the editor and there should be no way to exclude a label for accessibility. It could be a hidden |
I'd like to add that it's pretty saddening and not motivating at all that this bug is in the codebase since more than one year and no one noticed it so far. Once again, this is not complex. It's basic HTML. And we're failing at it. Honestly, I think we're at a point where either this project needs to make sure this kind of bugs will not happen again or, not my intent to offend anyone, this project needs to consider to restrict merge permission only to contributors who can assure some higher code quality. |
Hey folks, thank you for your continued effort in flagging all these accessibility violations. As there already is an open issue (#51740) where the general topic is being actively discussed, we should probably continue the conversation there to avoid repetition and keep the focus. I would also kindly ask you not to be pinged on every single labelling-related issue, as I'm definitely not in charge of single-handedly maintaining this part of the codebase (and we already have a separate issue). |
Apologies, I didn't see the PR linked above 🤦🏻 I've closed my PR |
Thanks for the discussion here, folks, I think this one might have been my oversight when originally introducing the component to pair a Good to know that it was missed and that in that scenario we still need to have labels on each individual controls within that fieldset, even if the labels aren't visible. In this case, what is the desired label for each component? We have a |
An accessibility bug doesn't mean that contributors lack accessibility training. That would be like saying a logic error means that contributors can't program or a typo means that contributors can't spell. It's a mistake, they're inevitable, please be kind and assume positive intent. |
@noisysocks I agree sometimes delivery isn't great and it should have been phrased better but it's also like saying let's remove PHPUnit and lint checks from Core and good luck. As long as Gutenberg has been around, there should be more solid tests around accessibility and we should be designing in such a way that devs get big nasty warnings when something might be inaccessible so that way mistakes are less likely to happen. I agree, I don't think the blame helps much here but it would be nice to start seeing some things evolve in the right direction. We're all people, we're all going to make mistakes. Let's figure out how to implement technology/automation in such a way that mistakes are less likely to happen. If you look back in some previous PRs, even I have made things worse from time to time or broken Voiceover when it worked on Windows. Thanks. |
Yep absolutely. Automated testing for common a11y errors sounds like it would be valuable. Is it something you're interested in exploring? |
@noisysocks It has been attempted before but never really made it completely. I don't have a lot of JavaScript experience as front-end development isn't my day job so I wouldn't really know how to drive a goal like that. |
Description
Yet another case of unlabeled controls. Cc @ciampo
Discovered while working on #57680
The
HeightControl
uses two components under the hood:UnitControl
.RangeControl
They are both totally unlabeled, as HeightControl dosn't pass any label to them
The components themselves are open to misues, as omitting the
label
prop doesn't throw any error / warning / deprecation.Unlabeled controls are not acceptable after almost 7 years of life of this project. This is basic accessibility and I would say basic HTML.
Step-by-step reproduction instructions
label
element.aria-label
element.Screenshots, screen recording, code snippet
Current state on trunk, notice the lack of a
label
prop oraria-label
attribute:UnitControl
in the HeightControl:gutenberg/packages/block-editor/src/components/height-control/index.js
Lines 153 to 160 in 169e2e5
RangeControl
in the HeightControl:https://github.com/WordPress/gutenberg/blob/trunk/packages/block-editor/src/components/height-control/index.js/#L164-L178
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: