Skip to content
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

Reintroduce EuiSwitch a11y changes #2385

Closed
thompsongl opened this issue Sep 26, 2019 · 10 comments · Fixed by #2491
Closed

Reintroduce EuiSwitch a11y changes #2385

thompsongl opened this issue Sep 26, 2019 · 10 comments · Fixed by #2491
Assignees

Comments

@thompsongl
Copy link
Contributor

#2193 was reverted because of difficulty upgrading Kibana. We want to reintroduce the changes and ensure time for upgrading Kibana before a FF

@thompsongl thompsongl self-assigned this Sep 26, 2019
@thompsongl
Copy link
Contributor Author

thompsongl commented Sep 30, 2019

Design question (@snide): elastic/kibana#43717 (comment)
Gist: Switches without labels are no longer valid. Is this ok? If so, we'll need to audit usage and decide what to do with label-less switches in Kibana.

@snide
Copy link
Contributor

snide commented Sep 30, 2019

@thompsongl Lookign at the changes there, if switches are buttons, an aria-label should be ok in place of the label. Specifically that linked case is a good example of one (it looks like an aria-label is on it as well)

@thompsongl
Copy link
Contributor Author

Ok. I think we'll just need to update EuiSwitch to require either a label or and aria-label (right now I think a label is required)

@thompsongl
Copy link
Contributor Author

Functional test updates are the other sizeable effort. The original PR (linked above) has a lot of work we can cherry pick, but not every failure was resolved.

@myasonik
Copy link
Contributor

myasonik commented Oct 2, 2019

What sort of situations are we getting into where we have switches without labels? Know of any examples?

(Dave's right, we can technically support it with aria-label but it just sounds like I'd need to know what a control is before I click on it...)

@thompsongl
Copy link
Contributor Author

@myasonik elastic/kibana#43717 (comment) shows one case. It's likely there are others, but we'd have to find them.

@snide
Copy link
Contributor

snide commented Oct 2, 2019

There are always going to be plenty. The label will often not be phsyicially bound to the component, but be described elsewhere. The very common example is anytime we need to show a column of switches against rich content.

@thompsongl
Copy link
Contributor Author

Refreshed my memory of just why this was so hard the first time around: Angular.

We'll have to find a shim/manual update of Angular form dirty/touched checking for instances of EuiSwitch in Vis (still uses quite a lot of Angular). Per elastic/kibana#38269, we likely can't just wait for Angular to be removed. Just an update on the way forward.

@myasonik
Copy link
Contributor

Would we ever ship 2 versions of a component?

Like a AngularDeprecatedEuiSwitch and EuiSwitch...

@snide
Copy link
Contributor

snide commented Oct 24, 2019

Would we ever ship 2 versions of a component?

I'd try to avoid doing this. It creates a matrix of maintainability on both sides that gets hairy. The last thing we want to do is make the situation more complicated to understand.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants