Skip to content

fix: add iframe title and fix setTimeout memory leak in SuggestionPanel#289

Merged
Nitya-003 merged 1 commit into
Nitya-003:mainfrom
khushboo-khatoon:fix/iframe-title-and-settimeout-cleanup-suggestion-panel
Jun 18, 2026
Merged

fix: add iframe title and fix setTimeout memory leak in SuggestionPanel#289
Nitya-003 merged 1 commit into
Nitya-003:mainfrom
khushboo-khatoon:fix/iframe-title-and-settimeout-cleanup-suggestion-panel

Conversation

@khushboo-khatoon

Copy link
Copy Markdown
Contributor

Summary

Fixed two issues in SuggestionPanel.tsx related to accessibility
and memory leak.

Changes

Bug 1 — Added title to Spotify iframe

Spotify <iframe> was missing a title attribute. Screen readers
could not describe what the iframe contains to visually impaired users.

Added title="Spotify Soundscape Player" to the iframe.

Bug 2 — Fixed setTimeout memory leak in handleSaveNotes

setTimeout inside handleSaveNotes was never cleared. If user
navigates away before 1 second, component unmounts but timeout still
fires and tries to update state on unmounted component.

Moved setTimeout into a useEffect with proper cleanup using
clearTimeout on unmount.

Files Changed

  • SuggestionPanel.tsx

Testing

  • Lighthouse accessibility score no longer flags missing iframe title
  • Screen readers can now correctly describe the Spotify player
  • No React warning about state update on unmounted component
  • Saving notes and navigating away immediately no longer causes memory leak

Fixes #283

@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

@khushboo-khatoon is attempting to deploy a commit to the Nitya Gosain's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Nitya-003 Nitya-003 merged commit 5e8f5c1 into Nitya-003:main Jun 18, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

missing iframe title and setTimeout memory leak in SuggestionPanel.tsx

2 participants