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

update to focus placement for modal dialogs #3214

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions techniques/failures/F85.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
<p>All technologies.</p>
</section><section id="description"><h2>Description</h2>
<p>This describes the failure condition that results when a Web page opens a dialog or menu interface component embedded on the page in a way that makes it difficult for a keyboard user to operate because of its position in the sequential navigation order. When the user opens the dialog or menu embedded on the page by activating a button or link, their next action will be to interact with the dialog or menu. If focus is not set to the dialog or menu, and it is not adjacent to the trigger control in the sequential navigation order, it will be difficult for the keyboard user to operate the dialog or menu.</p>
<p>Dismissing a dialog or menu means to close it without taking any action on it. For example: a modal dialog opens on a Web page and displays a sign-up form for a mailing list. A user dismisses the dialog by either pressing a "close" button or using the Escape key.</p>
</section><section id="examples"><h2>Examples</h2>
<section class="example">
<h3>Adding a dialog or menu embedded on the page to the end of the sequential navigation order</h3>
Expand All @@ -23,14 +24,14 @@ <h3>Setting focus to the document after dismissing a menu embedded on the page</
<p>Activate the trigger control via the keyboard.</p>
<ul>
<li>Check whether focus is in the menu or dialog.</li>
<li>Check whether advancing the focus in the sequential navigation order puts focus in the menu or dialog.</li>
<li>Check whether moving the focus forwards once in the sequential navigation order puts focus in the menu or dialog.</li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking of dialogs with no interactive content apart from the close icon. When focus is set here on opening, it is often not easy to see since there is no other focus position to go to - in effect you can either press enter or ESC to close. In these situations the second check would not work. Not sure if this edge case (not too infrequent though) needs to be covered...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the "check" may not necessarily be a visual check. an auditor may also just check document.activeElement.

</ul>
</li>
<li>
<p>Dismiss the menu or dialog.</p>
<p>Dismiss the menu or dialog</p>
<ul>
<li>Check whether focus is on the trigger control.</li>
<li>Check whether advancing the focus backwards in the sequential navigation order puts focus in the trigger control.</li>
<li>Check whether moving the focus backwards once in the sequential navigation order puts focus in the trigger control.</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"focus in" > "focus on" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't this be said in less technical language?

alastc marked this conversation as resolved.
Show resolved Hide resolved
</ul>
</li>
</ol>
Expand Down