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

fix(forms/*): allow all form control value checks to work with virtual nodes #2343

Merged
merged 2 commits into from
Jul 7, 2020

Conversation

straker
Copy link
Contributor

@straker straker commented Jul 2, 2020

Part of issue: #2183 of checks that use accessible-text-virtual code path (for example,focusable-no-name)

Reviewer checks

Required fields, to be filled out by PR reviewer(s)

  • Follows the commit message policy, appropriate for next version
  • Code is reviewed for security

@straker straker requested a review from a team as a code owner July 2, 2020 17:25
lib/commons/forms/is-native-textbox.js Outdated Show resolved Hide resolved
(nodeName === 'INPUT' && !nonTextInputTypes.includes(node.type))
nodeName === 'textarea' ||
(nodeName === 'input' &&
!nonTextInputTypes.includes((node.attr('type') || '').toLowerCase()))
Copy link
Contributor

Choose a reason for hiding this comment

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

May not be necessary for this PR, but I think we should consider adding virtualNode.props.type by default, in the same way that we set nodeType. That way we don't have to do this type casting, and it'd give us an easier way to deal with inputs defaulting to type=text.

@straker straker merged commit 8ad41af into develop Jul 7, 2020
@straker straker deleted the forms-virtual-node branch July 7, 2020 14:25
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.

2 participants