Skip to content

Officers UI: behavior when user clicks enter/return while add or change form is open #30777

Closed

Description

Steps to Reproduce

Description and Context
Currently if you click enter while the officer edit or add form is open, the form saves and closes automatically. There doesn't seem to be a risk of losing work here because the form does save when it closes. Ideally though clicking the enter/return button wouldn't submit the add or change form - it might be more likely to happen by accident if the user is navigating through this with a keyboard.

Current state
Right now if the add or change form is open and the user hits enter on any input field (except country) the form submits. The existing changes that were entered are saved.

Future state

  • If the user selects 'enter/return' select or activate the element in focus (same as clicking with mouse)

Activity

  1. added
    Entities Team
    on Sep 18, 2025
  2. vikas-gov commented on Sep 19, 2025

    @vikas-gov
    Collaborator

    @OlgaPotiagalova pls review

  3. changed the title [-]Officers: behavior when user clicks enter/return while add or change form is open[/-] [+]Officers UI: behavior when user clicks enter/return while add or change form is open[/+] on Sep 19, 2025
  4. Mihai-QuickSilverDev commented on Sep 25, 2025

    @Mihai-QuickSilverDev
    Collaborator

    @JohnamLane Is this something that Dietrich could work on?

  5. JohnamLane commented on Sep 25, 2025

    @JohnamLane
    Collaborator

    @Mihai-QuickSilverDev Please defer to Olga is cross-team work is required. I would not contemplate assigning Dietrich to this unless it was deemed critical by a PO and they didn't have time/people to work on it.

  6. OlgaPotiagalova commented on Sep 29, 2025

    @OlgaPotiagalova
    Collaborator

    Current behavior is inconsistent with the rest of the Business Registry application and may lead to accidental submissions, especially when users expect to move to the next field or select a suggestion.
    Since other forms follow a consistent pattern, this deviation could confuse users or interrupt their workflow. It’s definitely not a blocker, but aligning the behavior would improve overall consistency and reduce friction for users.

    @JohnamLane

  7. deetz99 commented on Oct 31, 2025

    @deetz99
    Collaborator

    especially when users expect to move to the next field or select a suggestion

    Why would a user expect to move to the next section when pressing Enter? You navigate between inputs with the Tab key. Not Enter.

    Also, selecting a suggestion in the dropdowns still works as expected with the Enter key.

    Since other forms follow a consistent pattern, this deviation could confuse users or interrupt their workflow. It’s definitely not a blocker, but aligning the behavior would improve overall consistency and reduce friction for users.

    I would argue this would create more friction. Submitting on enter is the default functionality of HTML forms. Why would we go against the grain?

    Have you ever filled your password and then pressed enter to login instead of clicking the 'Log In' button? Why would we intentionally remove that functionality?

    https://developer.mozilla.org/en-US/docs/Web/API/HTMLFormElement/submit_event

  8. deetz99 commented on Oct 31, 2025

    @deetz99
    Collaborator

    If the user selects 'enter/return' while focused on the street address field with the canada post drop down showing, then the first address listed is selected (this is implemented in some other filings, like the incorporation application)

    The way this works currently on Change of Directors for example the address dropdown is unusable when using a screenreader. Please consider this when suggesting changes. I don't think we should be intentionally making things less accessible.

  9. jacqueline-williams-549 commented on Nov 5, 2025

    @jacqueline-williams-549
    Author

    @OlgaPotiagalova @deetz99

    According to the World Wide Web Consortium accessibility guidelines, the Enter key should "select or activate the element in focus (same as clicking with mouse)” So if someone’s typing in a field and hits Enter nothing would really happen because the field was already active. For something like a dropdown though, hitting Enter would open it. According to W3C that is the standard keyboard behavior that screen reader and keyboard users expect so I proprose we go with that.

    https://www.w3.org/WAI/standards-guidelines/act/rules/a1b64e/proposed/

  10. deetz99 commented on Nov 5, 2025

    @deetz99
    Collaborator

    I'm not sure how relevant this is.

    This is a proposed rule: This section is not part of the official rule..

    Also the rule is about keyboard trap: Focusable element has no keyboard trap via standard navigation

    The description: This rule checks if it is possible to use standard keyboard navigation to navigate through all content on a web page without becoming trapped in any element.

  11. deetz99 commented on Nov 5, 2025

    @deetz99
    Collaborator

    W3C predictable

    Make web pages appear and operate in predictable ways.

    W3C 4.1.2 Name, Role, Value

    Image

    For example, standard HTML controls already meet this success criterion when used according to specification.

    W3C Using HTML according to spec

    The objective of this technique is to use HTML according to its specification.

    HTML specification, Implicit submission

    There are pages on the web that are only usable if there is a way to implicitly submit forms, so user agents are strongly encouraged to support this.

  12. vikas-gov commented on Nov 6, 2025

    @vikas-gov
    Collaborator

    @janisrogers pls review with Jacqueline and Deetz on the approach and UI behaviour

  13. 5 remaining items

  14. jacqueline-williams-549 commented on Nov 6, 2025

    @jacqueline-williams-549
    Author

    Thanks for the links and information. If this is something that will make the experience more predictable and user friendly then we should keep the functionality where enter saves the form. I do see that there are a number of patterns out there (gmail, Airbnb) where hitting enter submits some forms and I also see that some keyboard users see this as an important shortcut for them to complete forms faster.

    Janis has raised some concerns that this implicit submission is inconsistent with other forms we have on other filings such as an IA for example. If everything will definitely be in nuxt at some point then this pattern should become the standard although that may take a long time before everything is moved over. Also just want to note that this prioritized as p3 right now so I will try to give this some more consideration and discuss with @janisrogers

    Note: when the edit or add officer form is saved, hitting enter does not currently submit the "filing"

  15. deetz99 commented on Nov 7, 2025

    @deetz99
    Collaborator

    I agree that consistency is important.

    This functionality is a best practice, which is what we should be aiming for.

    We are building a set of reusable form elements for several filings that are due to be upgraded, so while they may be inconsistent with previous filings, all new/updated filings should be built to best practices.

    I understand this exact issue isn't necessarily the highest priority but it is important for our new foundation to be built to the highest standard we are able to (including other accessibility improvements where applicable and having responsive designs).

    Regarding Officers: I'll need to make some updates with these reusable pieces so will look to sort that out at that time.

  16. OlgaPotiagalova commented on Nov 14, 2025

    @OlgaPotiagalova
    Collaborator

    Some frameworks default to submitting the form when Enter is pressed inside a single input field, but that does not apply to complex multi-field forms or modal forms. Enter should not automatically save or close a multi-field form unless the user explicitly interacts with the Save button.

    I suggest UX team to do a comprehensive research and define a consistent, application-wide standard for how Enter/Return and other keyboard actions should behave in all forms. This should align with common UX patterns, accessibility guidelines, and user expectations.

  17. mstanton1 commented on Jan 29, 2026

    @mstanton1
    Collaborator

    @mbertucci this is another enhancement from the officers feedback. Can you determine where you would like this to live?

  18. mbertucci commented on Jan 29, 2026

    @mbertucci
    Contributor

    @mstanton1 this is currently in the Product Backlog for our team just waiting to be pulled in. I imagine this isn't as high priority as our other work and will discuss it with the team. @deetz99 Let discuss tomorrow,

  19. mstanton1 commented on Jan 29, 2026

    @mstanton1
    Collaborator

    Absolutely. This seems to be much lower priority. Just keen to do some clean-up!

  20. deetz99 commented on Jan 30, 2026

    @deetz99
    Collaborator

    Sorry just to comment on this again:

    Some frameworks default to submitting the form...

    It's not "some frameworks", it's the standard HTML <form> element behaviour. Any correctly structured form should behave this way.

    but that does not apply to complex multi-field forms or modal forms.

    Again, anything inside a <form> element should behave this way, multi field or not.

    Enter should not automatically save or close a multi-field form

    But why?

    I suggest UX team to do a comprehensive research and define a consistent, application-wide standard for how Enter/Return and other keyboard actions should behave in all forms. This should align with common UX patterns, accessibility guidelines, and user expectations.

    Yes I agree.

  21. removed
    Entities Team
    on Jan 30, 2026
  22. added
    enhancement
    on Jan 30, 2026
  23. TVWerdal commented on Nov 13, 2026

    @TVWerdal
    Collaborator

    This functionality has been deemed best practice. This also is present multiple places across the site since this ticket first came up, has been used in this form extensively and has not been revisited in that time. Closing ticket because this seems to work as intended, and has not caused any further concern or feedback since the functionality was released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions