patternfly / patternfly/patternfly-react
Modal default focus prioritizes close button over content elements
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 862
- Forks
- 392
- Avg merge
- 4d 8h
- Merged PRs (30d)
- 9
Description
When a Modal opens, focus currently defaults to the close (X) button in the header, regardless of what interactive elements exist within the modal content. This behavior is a bit counterintuitive. The default focus should prioritize the first meaningful, focusable element within the modal body (e.g., a primary action button) rather than header controls.
This request originates from a Red Hat product team. There is no hard deadline.
Jira Issue: PF-2526
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Modal implementation and its existing focus-management tests, then reproduce the default focus behavior with interactive content in the modal body. Done means focus prioritizes the first meaningful focusable body element over the header close button while preserving expected modal focus behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100