-
Notifications
You must be signed in to change notification settings - Fork 357
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
Develop example of modal dialog design pattern #103
Comments
I’ll take this one. |
@MichielBijl, are you planning on more than one example? I'm wondering where focus should go in the case where the content of the dialog is not a typical form with multiple interactive elements (including a close button), but rather a dialog where the content is information that the user should be able to read through with the arrow keys, and where the only interactive element is the close button. In this case, would it make sense to put the initial focus on the h1 of the dialog, a non-interactive element? |
@terracoda I think in your case alertdialog role would be good option here you can find detail information. |
@umermughal, thanks for the quick reply. I should have been more explicit. In my case, the dialog is a help dialog that contains a list of keyboard commands. The user actively requests the dialog. It is not an alert that interrupts the user's work flow. In some cases there can be a fair amount of content in the dialog that user should be able to read at their own pace. So I am wondering if it is best to set the focus on the only interactive element, the close button, or the H1 with tab-index -1. The H1 one seems logical to me because ideally the user will read some or all of the content before looking for the close button, or Escaping away. |
@terracoda, @MichielBijl was not aware I had this example sitting in the dialog-modal branch for a while. I will work on merging it into master very soon, like in the next 24 hours, so you can check it out. It has 3 dialogs of various sizes. For dialogs with lots of content that can scroll, it is good to have focus on an element in the portion that is visible when the dialog opens. That could be a heading if there are no interactive elements. |
@mcking65 thanks for your reply, and looking forward to reviewing the examples! |
Added commit 2493510 with first build of the |
The modal dialog example development for issue #103 is complete. The following changes start the review process. Modified aria-practices.html to replace link to issue 103 with a link to the new example page. Modified examples/dialog-modal/dialog.html to add link to review issue 321.
Initial development is now complete. Closing this issue and starting the review process in issue 321. |
No description provided.
The text was updated successfully, but these errors were encountered: