-
Notifications
You must be signed in to change notification settings - Fork 168
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 HasLabel #3241
Comments
Something like
would be useful.. Requires updates to the component generator etc |
Would this apply to buttons and icons as well? Is this about accessibility labels or just visual field labels? |
I believe this was intended to the components with the Do you @jouni see this should also automatically map to the |
Possibly. Requires testing (all our components with labels) that it does not interfere with announcing other pieces of content inside an element. With a quick test (macOS Safari & VoiceOver) it doesn’t seem to do harm. |
OK. @tomivirkki I don't know where to create an issue for testing and then possibly implementing this to some of our web components with the This issue can be kept for detecting the |
Lets keep this issue just for the server side mixin interface Acceptance CriteriaAdd
EDIT: just add the mixin interface and a unit test for it (so it won't be accidentally removed). And instead of adding the code for the generator, one could just make lots of PRs for all the web component integrations to add the There probably should be another similar but separate |
I don't why only the components that have a Another example: https://cdn.vaadin.com/vaadin-button/2.1.3/demo/#button-accessibility-demos |
Yes it would be a separate issue to add |
bringing this to attention, as I have yet another customer project in which having |
As updated the acceptance criteria above #3241 (comment) the |
HI @pleku I can work on this issue. |
Add new HasLabel interface to be used by components that supports label definitions Fixes #3241 Co-authored-by: Pekka Hyvönen <[email protected]>
Thanks for the contribution @ovidiupopa91 ! Interface is added in Flow 3.2 and will be in Vaadin 17 but it is another story to take it into use in our components. Basically all field components should get it, but it is an open question if those want to override the getter method and retain the existing behavior or not. If you're up for it @ovidiupopa91 , you can start with https://github.com/vaadin/vaadin-text-field-flow |
Hi @pleku . No problem :) Yes, I can start with https://github.com/vaadin/vaadin-text-field-flow. Will you open a new issue in the repository page? |
I see that the A ticket for that can be found here vaadin/flow-components#956 |
I have the following Vaadin 7 code, which I ported to Flow.
I ended up with the following solution with Flow because there is no a superclass or an interface which would contain the
setLabel
method:I think that there could be a
HasLabel
interface implemented by all Components which have a label. That would simplify the above solution.The text was updated successfully, but these errors were encountered: