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

Develop example of modal dialog design pattern #103

Closed
mcking65 opened this issue Aug 29, 2016 · 8 comments
Closed

Develop example of modal dialog design pattern #103

mcking65 opened this issue Aug 29, 2016 · 8 comments
Assignees
Labels
Example Page Related to a page containing an example implementation of a pattern

Comments

@mcking65
Copy link
Contributor

No description provided.

@mcking65 mcking65 added the Example Page Related to a page containing an example implementation of a pattern label Aug 29, 2016
@mcking65 mcking65 added this to the 1.1 PR milestone Aug 29, 2016
@ZoeBijl ZoeBijl self-assigned this Feb 22, 2017
@ZoeBijl
Copy link
Contributor

ZoeBijl commented Feb 22, 2017

I’ll take this one.

@terracoda
Copy link

@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?

@umermughal
Copy link

@terracoda I think in your case alertdialog role would be good option here you can find detail information.
https://www.w3.org/TR/wai-aria-1.1/#alertdialog
https://www.w3.org/TR/wai-aria-practices/#alertdialog

@terracoda
Copy link

@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.

@mcking65
Copy link
Contributor Author

@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.

@terracoda
Copy link

@mcking65 thanks for your reply, and looking forward to reviewing the examples!

@mcking65
Copy link
Contributor Author

Added commit 2493510 with first build of the
modal dialog example.

mcking65 added a commit that referenced this issue Mar 16, 2017
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.
@mcking65
Copy link
Contributor Author

Initial development is now complete. Closing this issue and starting the review process in issue 321.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Example Page Related to a page containing an example implementation of a pattern
Development

No branches or pull requests

4 participants