salesforce / salesforce/design-system-react
Modal: Focus close button on open. Fallback to wrapping container div if no close button
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 982
- Forks
- 440
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 4
Description
Issue: Screen readers read all lines of text as "clickable", sometimes reading multiple "clickable" before reading the content
Potential cause: Most likely a click handler is higher in the DOM (maybe the close button?) and everything inside this becomes clickable as well.
Possible solutions: Is it possible to wrap the click event in a clickable event that is not the parent for the other child elements that are reading as clickable? Please see this (older) WebAIM thread that has a long discussion of this type of issue for other potential solutions (https://webaim.org/discussion/mail_thread?thread=7693)
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 with the linked SLDSModal reproduction, especially the “Modal with Custom Parent Node” story, and inspect the Modal implementation and its focus behavior. Verify how screen readers announce the modal when it opens with and without a close button; done means focus reaches the close button when present and otherwise falls back to the wrapping container without child content being announced as clickable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100