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

Filterable Multiselect focus outline on wrong node #7535

Closed
wkeese opened this issue Jan 12, 2021 · 5 comments · Fixed by #7722
Closed

Filterable Multiselect focus outline on wrong node #7535

wkeese opened this issue Jan 12, 2021 · 5 comments · Fixed by #7722

Comments

@wkeese
Copy link
Contributor

wkeese commented Jan 12, 2021

When a filterable multiselect has some options selected, clicking on it's <input> puts focus outline on wrong node:

Screen Shot 2021-01-12 at 22 05 18

Environment

Operating system

MacOS

Browser

Chrome

Detailed description

What version of the Carbon Design System are you using?

10.26

What did you expect to happen?

Focus outline around whole control.

What happened instead?

Focus outline around <input>

Test case

See https://react.carbondesignsystem.com/?path=/story/multiselect--filterable or https://react.carbondesignsystem.com/?path=/story/multiselect--filterable

Note that clicking more to the left will put the focus outline around the whole control:

Screen Shot 2021-01-12 at 22 19 22

Presumably a regression from #4721.

@dakahn
Copy link
Contributor

dakahn commented Jan 16, 2021

@wkeese I can't recreate this on Windows in either Chrome or Firefox using our Storybook. Do you still see this error?

@wkeese
Copy link
Contributor Author

wkeese commented Jan 16, 2021

Yes, I do. Just retested on Chrome on Windows 10. Probably, you forgot to select some options in the dropdown first? Try using TAB and SHIFT-TAB to go back and forth between the (2x) button and the <input>.

Screen Shot 2021-01-16 at 13 42 16

Also, note that this is about the filterable multiselect.

@wkeese wkeese changed the title Multiselect focus outline on wrong node Filterable Multiselect focus outline on wrong node Jan 16, 2021
@tw15egan tw15egan self-assigned this Jan 20, 2021
@tw15egan tw15egan removed their assignment Jan 21, 2021
@dakahn
Copy link
Contributor

dakahn commented Jan 21, 2021

@wkeese thanks I see it now, thanks for your patience.

@carbon-design-system/design while it might look a little questionable I don't actually have a problem with this behavior from an accessibility stand point. The text input is receiving focus correctly. In fact an argument could be made that this behavior helps magnification users better determine the actual input on the form as distinct from the button to clear the selections since visually we combine a listbox and a button here.

@wkeese
Copy link
Contributor Author

wkeese commented Jan 21, 2021

I agree you can debate which focus outline is better from an accessibility standpoint, but I think you need to pick one way or the other. Right now tabbing into or clicking on the <input> puts the focus outline on the <input>:

Screen Shot 2021-01-22 at 8 13 37

But clicking on the upper left (when options are selected) puts the focus outline on the whole control:

Screen Shot 2021-01-22 at 8 09 20

The other (very related) issue is that there's actually an extra tab stop on the whole control: clicking on the upper left and then pressing the tab key goes to the (2 x) button, and then another tab goes to the <input>... i.e. there are 3 tab stops where there should be 2.

(Both these screenshots are from React on Chrome/mac but I assume it's a universal behavior.)

PPS: I would also question the slightly different background colors for the left side vs. the input.

@wkeese
Copy link
Contributor Author

wkeese commented Jul 26, 2021

Looks like you fixed this. Judging from https://react.carbondesignsystem.com/?path=/story/components-multiselect--filterable the focus outline is always around the whole control (except when the (2x) button is focused, in which case the focus outline is just on that button).

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