-
Notifications
You must be signed in to change notification settings - Fork 80
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
Unable to include tooltips or signposts next to labels in several form fields #271
Comments
We're also having this issue. Can confirm that the following worked in v12 but doesn't in v13: <clr-combobox-container>
<label>
Form label
<clr-signpost>
<div clrSignpostTrigger>Trigger</div>
<clr-signpost-content *clrIfOpen>
Signpost content
</clr-signpost-content>
</clr-signpost>
</label>
<clr-combobox formControlName='comboControl'>
...
</clr-combobox>
</clr-combobox-container> |
Internal issue: https://jira.eng.vmware.com/browse/VPAT-12188 |
I was able to find a work around to this by making sure that the <clr-combobox-container>
<label>
Form label
<clr-signpost>
<button clrSignpostTrigger>Trigger</button> <!-- This works if it is a button -->
<clr-signpost-content *clrIfOpen>
Signpost content
</clr-signpost-content>
</clr-signpost>
</label>
<clr-combobox formControlName='comboControl'>
...
</clr-combobox>
</clr-combobox-container> |
The |
Sorry, I missed this part. I will reopen. |
This makes sense semantically. I see now in the documentation that the examples only use For styling, it also makes sense that the trigger is usually styled like a Clarity button (e.g. |
Using ng-clarity/projects/angular/src/data/datagrid/utils/key-navigation-grid.controller.ts Line 12 in 895bb00
Here you can see the selectors of what do we consider actionable elements. |
We cannot use info cds-icon with this workaround right? |
## PR Checklist Please check if your PR fulfills the following requirements: - [ ] Tests for the changes have been added (for bug fixes / features) - [ ] Docs have been added / updated (for bug fixes / features) - [ ] If applicable, have a visual design approval ## PR Type What kind of change does this PR introduce? <!-- Please check the one that applies to this PR using "x". --> - [X] Bugfix - [ ] Feature - [ ] Code style update (formatting, local variables) - [ ] Refactoring (no functional changes, no api changes) - [ ] Build related changes - [ ] CI related changes - [ ] Documentation content changes - [ ] Other... Please describe: ## What is the current behavior? Currently if you put signposts inside labels they are not working due to that `<label>` be default is spreading a click event to its children and that's causing the signpost to automatically close and not appear. **Example:** If you have a label attached to an input or input inside a label and click the label - the input will get focused. Issue Number: CDE-9 and #271 ## What is the new behavior? Signposts are now working inside `<label>`. ## Does this PR introduce a breaking change? - [ ] Yes - [X] No <!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information --------- Co-authored-by: Kevin Buhmann <kbuhmann@vmware.com>
Describe the bug
Clarity form control containers / fields such as: clr-input, clr-select, clr-combobox, clr-password etc. do not allow for a signpost to be added after the label.
Our forms can be complex we use this to offer more detailed information on a field that is too long for helper text. To get the visual UX we have to embed the signpost or tooltip within the label markup for a field. This causes accessibility screen readers issues. Other work arounds/ solutions are to put the signpost outside the control/ container entirely causing other problems with UX design and rewrite/ overriding css.
How to reproduce
Expected behavior
Developers should be able to add a signpost to any Cl form input/ field after the label.
Versions
Clarity version:
Framework:
Framework version:
_ie: Angular 13.3.0
Device:
Additional notes
The text was updated successfully, but these errors were encountered: