-
Notifications
You must be signed in to change notification settings - Fork 211
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
[Bug]: sp-number-field Increment/Decrement button labels #3273
Comments
In this case we have the label provided as "Package Width" so making the aria label as "Increase Package Width" or "Decrease Package Width" makes sense as we can just do a simple string concat however if the label was say "Choose Package Width" in that case the same aria-label value will become "Increase Choose Package Width" or "Decrease Choose Package Width" which would be weird. My point is having the aria label directly influenced by the label value might create such problems because users can put anything in the label (a sentence, a word, or a bunch of words)... Would love to know your thought son this! |
I agree that an awkward label could be supplied, but I'd argue that an awkward label for the buttons is also an awkward label for the input, e.g. "Choose Package Width" implies that there are options rather than a free input field. In this way, I'd say attaching this label in multiple places would be a reasonable advance of the functionality that is being delivered today, while effecting no changes on the existing API surface. If that felt not enough, then I'd suggest we look at this request in the context of #1975 wherein the need for internationalizing of small content pieces (like this secondary label) could be addressed in a more universal manner. The general move to an alternate API here would make expanding the Number Field API to support additional label content much less surprising. |
Yes that made a lot of sense. Thank you for the clarifications. I'll attach the label and make a PR soon :) |
Made a PR for this issue -> #3474 |
@jnurthen can you please test and let us know the outcome. |
Code of conduct
Impacted component(s)
sp-number-field
Expected behavior
The Number field increase/decrease buttons should use less technical and more specific text
We should use Increase/Decrease NOT Increment/Decrement
We should also use the number fields label as part of the text
So For
The buttons should be "Increase Package width" and "Decrease Package Width"
Actual behavior
Currently the buttons are labeled Increment/Decrement
Screenshots
No response
What browsers are you seeing the problem in?
Firefox, Chrome, Safari, Microsoft Edge
How can we reproduce this issue?
Sample code that illustrates the problem
No response
Logs taken while reproducing problem
No response
The text was updated successfully, but these errors were encountered: