Skip to content

Conversation

Dbansal06
Copy link
Contributor

@Dbansal06 Dbansal06 commented Jul 31, 2025

This pull request implements keyboard navigation for the mood slider in TalkHeal.py to enhance accessibility, addressing a new issue . The changes ensure users with motor disabilities can interact with the mood slider using arrow keys, and screen readers can properly interpret the slider’s state, aligning with TalkHeal’s mission to provide inclusive mental health support.

Changes Made:

Added a custom HTML/JavaScript mood slider using st.components.v1.html in TalkHeal.py, supporting left/right arrow key navigation for five emotional states (Very Sad, Sad, Neutral, Happy, Very Happy).

Included ARIA attributes (aria-valuemin, aria-valuemax, aria-valuenow) for screen reader compatibility.

Implemented AI-assisted coping tips displayed based on the selected mood.

Styled the slider with accent-color: #ff69b4 to match the soft pink/magenta UI.

Added a “Track Your Mood” section in the main UI, integrated after the header and tone display.

Testing:

Ran the app locally with streamlit run TalkHeal.py.

Verified keyboard navigation updates the slider and displays correct mood labels and coping tips.

Tested with a screen reader (e.g., NVDA) to confirm accessibility compliance.

Contribution: This is part of my GGSOC 2025 contribution to TalkHeal. The changes are confined to TalkHeal.py and maintain the existing functionality of authentication, chatbot, and other features. Please review and let me know if any adjustments are needed!

@eccentriccoder01
Copy link
Owner

@Dbansal06 please:

  • Open an issue of your own, and request to be assigned. We will duly assign you.
  • Link this PR to that issue
  • Pull the latest changes from the upstream if any
  • Provide a working Streamlit Cloud deployment link of your PR and relevant screenshots of the issue addressed by you.

Thanks!

@Dbansal06
Copy link
Contributor Author

Hello!

I have resolved the merge conflict in TalkHeal.py and the new "Track Your Mood" feature is now working correctly.

Here is the information you requested:

Streamlit Cloud Deployment

Deployment Link: https://talkheal-npusk6cgzqy2gbpurnhzfp.streamlit.app/

Screenshots

image image

I believe this pull request is now ready for your review.

Thank you!

@Dbansal06
Copy link
Contributor Author

Fixes #84

@eccentriccoder01 eccentriccoder01 linked an issue Aug 2, 2025 that may be closed by this pull request
@eccentriccoder01
Copy link
Owner

Great work @Dbansal06! Feel free to work on more issues, thanks for improving TalkHeal 💙

@eccentriccoder01 eccentriccoder01 merged commit 8dc4370 into eccentriccoder01:main Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc25 level 2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Add keyboard navigation for mood slider"
2 participants