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 Focus Lock issue #1595

Merged
merged 2 commits into from May 10, 2023
Merged

Fix Focus Lock issue #1595

merged 2 commits into from May 10, 2023

Conversation

GomezIvann
Copy link
Collaborator

@GomezIvann GomezIvann commented May 9, 2023

Checklist

  • Build process is done without errors and all tests pass in the /lib directory.
  • Self-reviewed the code before submitting.
  • Meets accessibility standards.
  • Added/updated documentation to /website as needed.
  • Added/updated tests as needed.

Description
As described in the linked issue, an error was spotted at the Dialog when using Jest and having to render this component. After some research, this problem was related to a nwsapi problem, which is a library used by Jest jsdom.

So, to fix this, the aria-disabled selector was removed from the tabbable elements query at the FocusLock component. Apart from solving this problem, the change is motivated by the fact that aria-disabled is a semantic attribute, i.e. it has no functionality on the component. Therefore, excluding elements with this attribute from the list of tabbable elements of the focus lock is unnecessary.

Additional context
Issue: dperini/nwsapi#81

Closes #1586

@GomezIvann GomezIvann marked this pull request as ready for review May 9, 2023 11:16
@aidamag aidamag self-assigned this May 9, 2023
@aidamag
Copy link
Contributor

aidamag commented May 10, 2023

Also, I did npm install in the lib folder and I can see a new dependency added into the package-lock.json. I think it would be a good idea to update it.

image

@aidamag aidamag merged commit 3a698b0 into master May 10, 2023
4 checks passed
@aidamag aidamag deleted the gomezivann-fix-focuslock branch May 10, 2023 15:37
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.

Jest Test - issue "Focus"
2 participants