-
Notifications
You must be signed in to change notification settings - Fork 843
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
Form Label uses pointer #823
Comments
Most labels are connected to the associated inputs (browsers have this functionality built in based on the label's I agree that the cursor should not be a pointer in your situation. @snide maybe move the cursor rule to a |
Seems like some kind of parent/child component to handle the click linking would work here, so you could still link clicking on the label with focus a given input. I'd be fine with just being able to opt out of the pointer cursor via an arg too. |
@chandlerprall That would probably work. Labels should always be clickable and focus the input / element you are applying it towards. Are you applying correct id/for attributes in your markup @w33ble? Also, those don't look like our labels fwiw. What does your rainbow item do? Does it accept focus? I assume those are separate buttons so they can be accessible? You'll need something to map the context. |
Probably not. Are there docs for this anywhere? I couldn't find them on the docs site, so I'm not actually sure how to use the component correctly. Also, the form control for the label isn't a real form control, so it wouldn't do anything natively, we'd have to wire it up manually. |
@w33ble The https://elastic.github.io/eui/#/forms/form-layouts
Beyond that, id/for is standard HTML. I don't know that we'd doc it. I'll make the CSS fix @chandlerprall suggested though. I think that's a good solution for the cursor issue. |
It looks like somehow the I'm certain we're using it wrong, but I don't know what we need to do to make it right. |
Sec, I'll build you a quick demo. |
https://codesandbox.io/s/8yz3npzool You'd do it this way if you wanted to avoid the visual glitch. Basically instead of using the magic labeling, you can just individually construct it from the plain components. It requires you to wire up your for/to or aria-describedby properties on your own though. |
And of course manage the state of the focus on your own if you wanted the labels to turn blue. |
Closing this in place of #826 which better details the issue |
Is there a reason that eui form labels use a pointer?
There are no click handlers in the component. Clicking them is futile.
The text was updated successfully, but these errors were encountered: