codeforpdx / codeforpdx/PASS

[Enhancement] - Enable the use of Enter keys for modals

Open
#527 18 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
JavaScript
Stars
38
Forks
23
Avg merge
11m
Merged PRs (30d)
4

Description

Describe the Current Behavior/Feature:

More related to Quality of Life changes as oppose to make the functions work.

While we have functioning modals doing what we want them to be doing, the submission of these modals are relegated to simply clicks. If there could be a way to simply perform the same action, but with the enter key, that would be nice. This type of change would be ideal for modals which only rely on buttons and doesn't have any textfields/input fields involved.

For example, if user wishes to log out, they could simply hit the "enter" key when the logout modal pops up as an alternative to clicking.

Or if we wish to push this further, we could also get these enhancements to work with modals with textfields/input fields, we could have the "enter" key work after the user exited the fields.

Rationale:

Ease of actions that would augment what we have with mouse presses.

Proposed Implementation (if applicable):

Include a listener when entering modals that would help perform actions with return.

Additional context:

Initially have this enhancement in mind for modals like the logout and inactivity message (see screenshot):

Screen Shot 2023-11-15 at 15 26 42

But could be expanded to other modal like add contacts or new message if it's something we think would be useful.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names the logout and inactivity modals as initial entry points; start by locating those modal implementations and checking how their button actions are triggered. Done means Enter performs the same action as the relevant button, with the behavior also considered for the mentioned add-contacts and new-message modals.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility, frontend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.