Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus on first visible field in form and in navigable layouts #1517

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

pavi41
Copy link
Contributor

@pavi41 pavi41 commented Jan 29, 2025

Description

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • 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:

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

@adobe-bot
Copy link

Accessibility Violations Found

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

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

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

Copy link

codecov bot commented Jan 31, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.41%. Comparing base (07639b3) to head (1508c4e).
Report is 10 commits behind head on dev.

Additional details and impacted files
@@             Coverage Diff              @@
##                dev    #1517      +/-   ##
============================================
+ Coverage     82.33%   82.41%   +0.08%     
- Complexity      963      968       +5     
============================================
  Files           107      107              
  Lines          2485     2491       +6     
  Branches        339      342       +3     
============================================
+ Hits           2046     2053       +7     
+ Misses          264      262       -2     
- Partials        175      176       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@adobe-bot
Copy link

Accessibility Violations Found

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




const firstVisibleChild = findFirstVisibleEnabledChild(formContainer.getModel()._children)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using private API's ? please only use public API from the model

@@ -225,6 +225,21 @@
panel.classList.add(this.constructor.cssClasses.panel.expanded);
panel.classList.remove(this.constructor.cssClasses.panel.hidden);
panel.setAttribute("aria-hidden", false);

if (document.activeElement === button) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this code required ? Its not clear, can you add some comments. Since this is part of common.js, this would also execute in authoring, which I don't think we need for this use-case


// ... existing code ...

focusToFirstVisibleField(id) {
Copy link
Collaborator

@rismehta rismehta Feb 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent the code and remove the commented code.

Copy link
Collaborator

@rismehta rismehta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check comments

@pavi41 pavi41 force-pushed the FORMS-16650 branch 3 times, most recently from 01f9225 to b7cc690 Compare February 6, 2025 09:12
@adobe-bot
Copy link

Lighthouse scores (mobile)

Performance Accessibility Best-Practices SEO
Scores 93 96 96 75

@adobe-bot
Copy link

Lighthouse scores (desktop)

Performance Accessibility Best-Practices SEO
Scores 100 96 96 75

@adobe-bot
Copy link

Accessibility Violations Found

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

1 similar comment
@adobe-bot
Copy link

Accessibility Violations Found

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants