aem-core-forms-components icon indicating copy to clipboard operation
aem-core-forms-components copied to clipboard

Fix default behaviour of enter press leading to form submission in core components.

Open muskgupta opened this issue 1 year ago • 11 comments

Description

Pressing enter on core components redirects to thankyou page which is not the correct behaviour. This fix prevents the default behaviour of enter press on form level.

Related Issue

https://jira.corp.adobe.com/browse/FORMS-15630

Motivation and Context

How Has This Been Tested?

Tested on localhost deployment and test cases tested using cypress.

Screenshots (if appropriate):

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] I have signed the Adobe Open Source CLA.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [x] I have read the CONTRIBUTING document.
  • [x] I have added tests to cover my changes and the overall coverage did not decrease.
  • [x] All unit tests pass on CircleCi.
  • [x] I ran all tests locally and they pass.

muskgupta avatar Aug 16 '24 05:08 muskgupta

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 81.94%. Comparing base (ba35f75) to head (24b99f8).

Additional details and impacted files
@@            Coverage Diff            @@
##                dev    #1360   +/-   ##
=========================================
  Coverage     81.94%   81.94%           
  Complexity      899      899           
=========================================
  Files           103      103           
  Lines          2337     2337           
  Branches        317      317           
=========================================
  Hits           1915     1915           
  Misses          259      259           
  Partials        163      163           

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Aug 16 '24 06:08 codecov[bot]

Can we also change the type of submit button in this PR, since the changes are related.

As discussed in scrum, will cover in separate PR.

muskgupta avatar Aug 16 '24 06:08 muskgupta

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 91 96 96 75

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 06:08 adobe-bot

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 88 96 96 75

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 08:08 adobe-bot

Accessibility Violations Found

Id Impact
focus-order-semantics minor
label-title-only serious
landmark-one-main moderate
region moderate
target-size serious

adobe-bot avatar Aug 20 '24 09:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 91 96 96 75

adobe-bot avatar Aug 20 '24 09:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 09:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 09:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 91 96 96 75

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 92 96 96 75

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

adobe-bot avatar Aug 20 '24 10:08 adobe-bot

Accessibility Violations Found

Id Impact
label-title-only serious
target-size serious

adobe-bot avatar Aug 20 '24 10:08 adobe-bot