From f9bbd7cf82f924d4f992a38cd9d373591d93a8f7 Mon Sep 17 00:00:00 2001
From: "Patrick H. Lauke"
Date: Sun, 2 Nov 2025 22:09:25 +0000
Subject: [PATCH 1/3] Clean up markup
---
understanding/20/no-keyboard-trap.html | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/understanding/20/no-keyboard-trap.html b/understanding/20/no-keyboard-trap.html
index 2b55a64103..e09405a1c4 100644
--- a/understanding/20/no-keyboard-trap.html
+++ b/understanding/20/no-keyboard-trap.html
@@ -11,17 +11,18 @@ Understanding No Keyboard Trap
In brief
- - Goal
- Keyboard users don't get stuck.
- - What to do
- Ensure users always know how to navigate away from components.
- - Why it's important
- People who rely on the keyboard often have no other means to navigate.
+ - Goal
+ - Keyboard users don't get stuck.
+ - What to do
+ - Ensure users always know how to navigate away from components.
+ - Why it's important
+ - People who rely on the keyboard often have no other means to navigate.
-
Intent of No Keyboard Trap
-
The intent of this success criterion is to ensure that that content does not "trap"
keyboard focus within subsections of content on a web page. This is a common problem
when multiple formats are combined within a page and rendered using plug-ins or embedded
@@ -38,15 +39,11 @@
Intent of No Keyboard Trap
Benefits of No Keyboard Trap
-
-
- People who rely on a keyboard or keyboard interface to use the web including people
who are blind and people with physical disabilities.
-
-
@@ -69,13 +66,10 @@ Examples of No Keyboard Trap
might still include user agent controls).
The dialog is dismissed by activating the Cancel button or the OK button.
-
Resources for No Keyboard Trap
-
-
{% # Data for associated techniques is defined in understanding/understanding.11tydata.js %}
From 9c9264e28ff364349373017ecc54deaeee150e3a Mon Sep 17 00:00:00 2001
From: "Patrick H. Lauke"
Date: Sun, 2 Nov 2025 22:31:21 +0000
Subject: [PATCH 2/3] Expand 2.1.2 understanding
Ports over most of the ideas from https://github.com/w3c/wcag/pull/4316/, but extends/clarifies them further.
---
understanding/20/no-keyboard-trap.html | 37 +++++++++++++++++---------
1 file changed, 25 insertions(+), 12 deletions(-)
diff --git a/understanding/20/no-keyboard-trap.html b/understanding/20/no-keyboard-trap.html
index e09405a1c4..4e1414d812 100644
--- a/understanding/20/no-keyboard-trap.html
+++ b/understanding/20/no-keyboard-trap.html
@@ -26,13 +26,26 @@ Intent of No Keyboard Trap
The intent of this success criterion is to ensure that that content does not "trap"
keyboard focus within subsections of content on a web page. This is a common problem
when multiple formats are combined within a page and rendered using plug-ins or embedded
- applications.
-
+ applications, or when custom components and widgets are not implemented with keyboard users
+ in mind.
- There may be times when the functionality of the web page restricts the focus to a
- subsection of the content, as long as the user knows how to leave that state and "untrap"
- the focus.
-
+ There may be times when it's appropriate for a web page to restrict focus to a subsection
+ of the content – for example, when the user is inside a modal dialog or popover. This does
+ not fail the requirements of this criterion, as long as the user knows how to "untrap" the focus
+ and leave that component.
+
+ Keyboard focus is not considered trapped when the user can navigate away from a component
+ using only a keyboard interface, and if it only requires unmodified arrow or Tab keys
+ or other "standard exit methods". This specification does not define what constitutes a
+ "standard exit method" – this is dependent on the user's hardware, user agent, and operating system,
+ and as such will require some interpretation from authors and auditors.
+ In most desktop environments, pressing the Esc key is a commonly used "standard exit method".
+ On mobile operating systems, the use of a physical "back" button on the device or external keyboard can
+ be seen as a "standard exit method".
+
+ If untrapping focus requires a different method (rather than unmodified arrow or Tab keys or
+ other "standard exit methods"), content can still pass this criterion provided that the user is
+ advised how they can untrap focus using their keyboard interface.
@@ -50,6 +63,12 @@ Benefits of No Keyboard Trap
Examples of No Keyboard Trap
+ - A modal dialog box
+ - A web application opens a dialog box. At the bottom of the dialog are two buttons,
+ "Cancel" and "OK". When the dialog is open, focus is trapped within the dialog –
+ tabbing from the last control in the dialog takes focus to the first control in the
+ dialog. The dialog is dismissed by activating the "Cancel" button, the "OK" button,
+ or the Esc key.
- A calendar widget
- A calendar widget allows users to add, remove or update items in their calendar using
the keyboard. The controls in the widget are part of the tab order within the web
@@ -59,12 +78,6 @@
Examples of No Keyboard Trap
- Once a user tabs into an applet, further tabs and other keystrokes are handled by
the applet. Instructions describing the keystroke used to exit the applet are provided
prior to the applet as well as within the applet itself.
- - A modal dialog box
- - A web application brings up a dialog box. At the bottom of the dialog are two buttons,
- Cancel and OK. When the dialog has been opened, all web page content outside the dialog becomes
- inert and cannot receive focus (though, depending on implementation, the focus cycle
- might still include user agent controls).
- The dialog is dismissed by activating the Cancel button or the OK button.
From b1a057866d086b2f70380888fc6c45fc0f44aca1 Mon Sep 17 00:00:00 2001
From: "Patrick H. Lauke"
Date: Mon, 3 Nov 2025 13:47:08 +0000
Subject: [PATCH 3/3] Add 'untrapping' to spell checker custom dictionary
---
custom-words.txt | 1 +
1 file changed, 1 insertion(+)
diff --git a/custom-words.txt b/custom-words.txt
index 0745a42b1c..42cc7a1c11 100644
--- a/custom-words.txt
+++ b/custom-words.txt
@@ -97,3 +97,4 @@ tristimulus
unsynchronized
untimed
untrap
+untrapping