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

Hidden text field is focusable and editable with Select with isDisabled=true #4943

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

pr7prashant
Copy link
Contributor

@pr7prashant pr7prashant commented Aug 19, 2023

Closes #4902

The isDisabled prop of the Select was not being passed down to the HiddenSelect.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

Can we add a test in https://github.com/adobe/react-spectrum/blob/main/packages/react-aria-components/test/Select.test.js

This should be sufficient.

  it('should send disabled prop to the hidden field', () => {
    render(
      <TestSelect isDisabled />
    );
    userEvent.tab();

    expect(document.activeElement).toBe(document.body);
  });

@pr7prashant
Copy link
Contributor Author

pr7prashant commented Aug 23, 2023

When I try to run yarn test or yarn jest, most of the tests are failing for me even on the main branch. I am able to test the changes on the storybook correctly. Am I missing something here ?

Node : 18.17.1
NPM : 9.6.7
Yarn : 1.22.19
OS : Ubuntu 22.04 on WSL

@LFDanLu
Copy link
Member

LFDanLu commented Aug 23, 2023

Can you try Node 16.20?

@LFDanLu LFDanLu merged commit 13a2792 into adobe:main Aug 24, 2023
26 checks passed
@pr7prashant pr7prashant deleted the issue-4902 branch August 25, 2023 02:35
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.

Hidden text field is focusable and editable with Select and isDisabled
3 participants