Skip to content

Conversation

@adamcarchibald
Copy link

@adamcarchibald adamcarchibald commented Mar 5, 2019

WHY are these changes introduced?

Resolves #1089

Fixes tab navigation behaviour in the Autocomplete component by not selecting the ComboBox when tabbing through the component.

WHAT is this pull request doing?

Changes the tabIndex prop value from 0 to -1 for the ComboBox component. Adds a regression test.

@ghost
Copy link

ghost commented Mar 5, 2019

👋 Thanks for opening your first pull request. A contributor should give feedback soon. If you haven’t already, please check out the contributing guidelines. You can also join #polaris on the Shopify Partners Slack.

@BPScott BPScott temporarily deployed to polaris-react-pr-1126 March 5, 2019 21:02 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-1126 March 5, 2019 21:13 Inactive
@BPScott BPScott temporarily deployed to polaris-react-pr-1126 March 6, 2019 14:55 Inactive
@adamcarchibald adamcarchibald changed the title [ComboBox] Remove tabindex prop [ComboBox] Change tabindex prop to a negative number Mar 6, 2019
@adamcarchibald adamcarchibald force-pushed the remove-tabindex-from-ComboBox branch from d922ea3 to fa9f577 Compare March 6, 2019 17:22
@adamcarchibald
Copy link
Author

I have removed the regression test as I am unable to determine a pattern for testing the tab navigation behaviour. I was following the pattern set out in similar tests for ComboBox but we discovered they are false positives as per #1128

@dpersing
Copy link

dpersing commented Mar 6, 2019

I'm wondering if a tabindex attribute is needed at all? The container won't take focus naturally, so I think it's safe to remove it altogether (unless there's something hooked into that specifically, in which case I'm wondering why that might be!).

Copy link
Member

@AndrewMusgrave AndrewMusgrave left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Were you able to tell if it's required for some reason?

@ry5n
Copy link
Contributor

ry5n commented Apr 10, 2019

I chatted with @adamcarchibald this morning. Rather than have this stall, the simplest thing might be to add a comment to ignore the lint rule to get this unblocked.

(In that case, The Polaris team should circle back later to fix the combobox implementation.)

@danrosenthal
Copy link

What's the next step here, @adamcarchibald? Should this be closed?

@adamcarchibald
Copy link
Author

adamcarchibald commented May 10, 2019

It was suggested that I simply remove the linting rule that is blocking this pr. Will make changes now and post update.

@adamcarchibald adamcarchibald force-pushed the remove-tabindex-from-ComboBox branch from 597cb69 to e4ad556 Compare May 10, 2019 14:37
@danrosenthal
Copy link

I spent some time this morning tophatting this change, and it has negative impact on the focus and keyboard behavior when compared to its current state in master. Both are unusable when interacted with using the arrow keys to move through available items.

We've documented the extensive problems with this component here: #689. Rather than spending time trying to patch something with deep issues, we should focus on rebuilding.

I think it makes sense to close this pull request and for the Polaris team to prioritize fixing this component.

@kaelig kaelig deleted the remove-tabindex-from-ComboBox branch October 1, 2019 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Autocomplete][v1] ComboBox uses tabindex=0 which causes tabbing issues with AutoComplete

7 participants