-
Notifications
You must be signed in to change notification settings - Fork 57
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
base: dev
Are you sure you want to change the base?
Conversation
2372780
to
20ddad4
Compare
Accessibility Violations Found
|
1 similar comment
Accessibility Violations Found
|
70a4490
to
7bfb94b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #1517 +/- ##
=========================================
Coverage 82.41% 82.41%
Complexity 968 968
=========================================
Files 107 107
Lines 2491 2491
Branches 342 342
=========================================
Hits 2053 2053
Misses 262 262
Partials 176 176 ☔ View full report in Codecov by Sentry. |
aabb39e
to
b77c7d1
Compare
Accessibility Violations Found
|
|
||
|
||
|
||
const firstVisibleChild = findFirstVisibleEnabledChild(formContainer.getModel()._children) |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want focus on the first field when tab expands so I have integrated it in the expansion logic
ui.frontend/src/view/FormPanel.js
Outdated
|
||
// ... existing code ... | ||
|
||
focusToFirstVisibleField(id) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
check comments
b7cc690
to
3baa68b
Compare
Lighthouse scores (mobile)
|
Lighthouse scores (desktop)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
b139482
to
7fb8caa
Compare
Lighthouse scores (desktop)
|
Lighthouse scores (mobile)
|
Accessibility Violations Found
|
2 similar comments
Accessibility Violations Found
|
Accessibility Violations Found
|
Description
Related Issue
Motivation and Context
How Has This Been Tested?
Screenshots (if appropriate):
Types of changes
Checklist: