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

Bug: isDisabledFromFieldset doesn't check the top-most disabled <fieldset> #596

Closed
DaviDevMod opened this issue Feb 27, 2022 · 3 comments · Fixed by #597
Closed

Bug: isDisabledFromFieldset doesn't check the top-most disabled <fieldset> #596

DaviDevMod opened this issue Feb 27, 2022 · 3 comments · Fixed by #597

Comments

@DaviDevMod
Copy link
Contributor

isDisabledFromFieldset is supposed to tell whether a node is in the first <legend> of the top-most disabled <fieldset>, but is actually assessing whether a node is in the first <legend> of the closest ancestor <fieldset>, which is not necessarily the top-most <fieldset> containing the node.

@DaviDevMod DaviDevMod changed the title Bug: Bug: isDisabledFromFieldset doesn't check the top-most disabled <fieldset> Feb 27, 2022
@stefcameron
Copy link
Member

You are right, thank you!

@stefcameron
Copy link
Member

@all-contributors add @DaviDevMod for bug

@allcontributors
Copy link
Contributor

@stefcameron

I've put up a pull request to add @DaviDevMod! 🎉

stefcameron pushed a commit that referenced this issue Mar 5, 2022
* fix(index.js): 'isDisabledFromFieldset' wasn't checking whether the disabled <fieldset> containing 'node' is the top-most disabled <fieldset>.

* Added test for form field nested in <legend> of disabled <fieldset> being  nested in disabled <fieldset>.

* Fixed a comment that, may have been misleading. "the node is not in the <legend> of the top-most disabled <fieldset>" may lead to believe that the node is in a <leged>, which does not belong to the top-most disabled <fieldset>, but at that point in the code, the node was not granted to be inside of a <legend> (infact the only time it is granted to be in a <legend> is inside of a return statement).

* Added tests for isFocusable and isTabbable.

* Implemented fixtures in isFocusable.e2e.js and isTabbable.e2e.js.
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 a pull request may close this issue.

2 participants