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

Input/Dropdown/Button should not have tab stops when disabled #966

Closed
levithomason opened this issue Dec 1, 2016 · 6 comments
Closed

Input/Dropdown/Button should not have tab stops when disabled #966

levithomason opened this issue Dec 1, 2016 · 6 comments

Comments

@levithomason
Copy link
Member

levithomason commented Dec 1, 2016

Steps

  1. Create a disabled Input, disabled search Dropdown, disabled Button
  2. Use the tab key to navigate to the Input, Dropdown, or Button

Expected Result

The tab key should skip focus for disabled Inputs, Dropdowns, and Buttons. The text should not be selected, neither should there be a tab stop here.

Actual Result

Even though the user can not enter text into the controls, there is a tab stop for them. The text is highlighted and the active blue border is applied. This is against the native behavior of HTML elements.

Version

60.1.8

Testcase

http://codepen.io/levithomason/pen/QGOPPG
Updated to add button: http://codepen.io/jeffcarbs/pen/QGQgPJ

image

@levithomason levithomason changed the title Input/Dropdown should not be focusable when disabled/readOnly Input/Dropdown should not have tab stops when disabled/readOnly Dec 1, 2016
@levithomason levithomason changed the title Input/Dropdown should not have tab stops when disabled/readOnly Input/Dropdown should not have tab stops when disabled Dec 1, 2016
@jeffcarbs jeffcarbs changed the title Input/Dropdown should not have tab stops when disabled Input/Dropdown/Button should not have tab stops when disabled Dec 3, 2016
@jeffcarbs
Copy link
Member

Added Button as well and updated the codepen.

Also, if we use the tabIndex={-1} to solve this we need to make sure that a user can override this. I can imagine wanting to allow a user to tab to a disabled element and display a tooltip explaining why it's disabled.

Currently a user cannot set tabIndex on Input or Button, so we should enable that with this work as well.

@levithomason
Copy link
Member Author

Thanks much!

@UnbrandedTech
Copy link
Contributor

Right now, if the dropdown is disabled or a search the tabIndex = undefined, is this the expected result? I think this Issue is meant to change the case of disabled to tabIndex = -1

@levithomason
Copy link
Member Author

Gonna tackle this as.

@levithomason
Copy link
Member Author

PR up #1100

@levithomason
Copy link
Member Author

Released in [email protected].

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

No branches or pull requests

3 participants