Skip to content

fix: exclude disabled elements from modal focus trap (#10562)#10597

Closed
Pratyush-Panda-2006 wants to merge 1 commit into
SAPTARSHI-coder:mainfrom
Pratyush-Panda-2006:fix/modal-trap-disabled-10562
Closed

fix: exclude disabled elements from modal focus trap (#10562)#10597
Pratyush-Panda-2006 wants to merge 1 commit into
SAPTARSHI-coder:mainfrom
Pratyush-Panda-2006:fix/modal-trap-disabled-10562

Conversation

@Pratyush-Panda-2006

Copy link
Copy Markdown
Contributor

fixes #10562

Modal Focus Trap Fix: Updated
modal.js
to exclude elements with the disabled attribute from the list of focusable elements inside the modal.
New Unit Tests: Created a new test file
modal.test.js
simulating active modals containing enabled and disabled elements to verify that focus skips disabled items on both forward and backward tab actions.
Verification: Executed npm test, formatting, and linting. All tests passed.

@github-actions github-actions Bot added component New UI components (buttons, cards, modals, tooltips, badges) core GSSoC-26 Official GSSoC 2026 issue gssoc:approved Approved for GSSoC contributions level:intermediate Requires moderate project understanding type:feature New functionality or enhancement labels Jun 16, 2026
@SAPTARSHI-coder

Copy link
Copy Markdown
Owner

🔒 Pull Request Closed: This PR has been automatically closed because it does not contain any file changes under the submissions/ directory. Contributors must place their submissions under submissions/examples/your-feature-name/. Thank you!

@github-actions

Copy link
Copy Markdown
Contributor

❌ Submission Validation Failed

Thank you for your contribution! However, some required files are missing.

📋 Required Structure

submissions/examples/your-feature-name/
├── demo.html     ← Interactive demo (required)
├── style.css     ← CSS styles (required)
└── README.md     ← Documentation (required)

🔍 Issues Found:

🔠 Folder: Core Framework Protection

Case-sensitivity violations found:

  • ❌ PR modifies core framework/configuration files: core/modal.js, tests/modal.test.js. Contributors are only allowed to modify files inside the submissions/ directory.

🔠 Folder: Submission Folder Protection

Case-sensitivity violations found:

  • ❌ This PR does not contain any modifications or additions inside the submissions/ directory. Contributors must place their submissions under submissions/examples/your-feature-name/.

📝 How to Fix:

  1. Add the missing files to your branch
  2. Push the changes to this PR
  3. The validator will automatically re-run

📖 See CONTRIBUTING.md for guidelines.

@github-actions

Copy link
Copy Markdown
Contributor

📊 CSS Bundle Size Benchmark

No change in CSS bundle size. ✨

@SAPTARSHI-coder

Copy link
Copy Markdown
Owner

🔒 Pull Request Closed: This PR has been automatically closed because it failed the repository's submission validation check.

To continue contributing, please address the errors shown in the validation summary comment above in your local branch, and open a new, clean Pull Request once resolved. Thank you!

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

Labels

component New UI components (buttons, cards, modals, tooltips, badges) core gssoc:approved Approved for GSSoC contributions gssoc:invalid GSSoC-26 Official GSSoC 2026 issue invalid-submission level:intermediate Requires moderate project understanding needs-files type:feature New functionality or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

accessibility: modal keyboard trap attempts to focus disabled input/button elements

2 participants