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

Auto focus modal content by default #5270

Closed
janett-baresel opened this issue Sep 4, 2022 · 4 comments
Closed

Auto focus modal content by default #5270

janett-baresel opened this issue Sep 4, 2022 · 4 comments
Assignees
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review.

Comments

@janett-baresel
Copy link

janett-baresel commented Sep 4, 2022

Summary

When using a modal dialog the content is not auto focused.

Actual Behavior

Opening a modal from a button will not auto focus the content. The focus stays in the document and continues "behind".

Desired Behavior

When opening a modal dialog the focus is automatically moved to the content or close button. Basically, call setFocus by default when the modal is opened. I cannot think of any user who wouldn't want this behavior.

Reproduction Sample

https://codepen.io/Programmine/pen/RwyNpJe

Reproduction Steps

  1. create calcite-button that has an onclick event
  2. onclick creates modal dialog and opens it
    -> focus remains on button and behind modal

Reproduction Version

latest

Working W3C Example/Tutorial

No response

Relevant Info

reproduced on chrome

Regression?

No response

SV-CH

@janett-baresel janett-baresel added 0 - new New issues that need assignment. a11y Issues related to Accessibility fixes or improvements. bug Bug reports for broken functionality. Issues should include a reproduction of the bug. needs triage Planning workflow - pending design/dev review. p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Sep 4, 2022
@janett-baresel janett-baresel changed the title Auto focus modal content Auto focus modal content not working Sep 4, 2022
@janett-baresel
Copy link
Author

@jcfranco I would like to change this from a bug report to an enhancement suggestion. Would I need to create a new ticket and close this one?

@benelan benelan added enhancement Issues tied to a new feature or request. and removed bug Bug reports for broken functionality. Issues should include a reproduction of the bug. a11y Issues related to Accessibility fixes or improvements. p - high Issue should be addressed in the current milestone, impacts component or core functionality labels Sep 7, 2022
@benelan
Copy link
Member

benelan commented Sep 7, 2022

Hi Jannet, we can use this issue, I just changed the labels. Thanks!

@janett-baresel janett-baresel changed the title Auto focus modal content not working Auto focus modal content by default Sep 14, 2022
@driskull driskull self-assigned this Nov 9, 2022
@driskull driskull added 2 - in development Issues that are actively being worked on. 3 - installed Issues that have been merged to master branch and are ready for final confirmation. and removed 0 - new New issues that need assignment. 2 - in development Issues that are actively being worked on. labels Nov 9, 2022
@github-actions github-actions bot assigned benelan and geospatialem and unassigned driskull Nov 16, 2022
@github-actions
Copy link
Contributor

Installed and assigned for verification.

@geospatialem geospatialem added 4 - verified Issues that have been released and confirmed resolved. and removed 3 - installed Issues that have been merged to master branch and are ready for final confirmation. labels Nov 17, 2022
@geospatialem
Copy link
Member

Verified the modal auto focus in beta.98 across Chrome, Firefox, and Edge browsers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - verified Issues that have been released and confirmed resolved. enhancement Issues tied to a new feature or request. needs triage Planning workflow - pending design/dev review.
Projects
None yet
Development

No branches or pull requests

4 participants