Problem/Motivation
For better user experience and accessibility, when an ajax callback is triggered, we should focus the input to the most logical spot when applicable.
Proposed resolution
Depending on button triggered:
- Add another item - focus to the first eligible input of new item
- Remove - focus to the first eligible input of last remaining item
User interface changes
Focus will be set to the eligible input if available.
API changes
We will return AjaxResponse() in the callbacks vs. array.
Issue fork custom_field-3587944
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
apmsooner commented