Skip to content

Create focus-returns-trigger-9au0ou.md #2022

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

Open
wants to merge 32 commits into
base: develop
Choose a base branch
from
Open
Changes from 2 commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6368b71
Create focus-returns-trigger-9au0ou.md
HelenBurge Jan 31, 2023
ef40a19
Update focus-returns-trigger-9au0ou.md
HelenBurge Jan 31, 2023
12d4cac
For new rule 9au0ou "Focus returns to trigger" - adding passed exampl…
dan-tripp-siteimprove Feb 17, 2023
28dc461
Update focus-returns-trigger-9au0ou.md
HelenBurge May 4, 2023
dad5892
Merge branch 'develop' into HelenBurge-patch-2
Jym77 May 25, 2023
16eb30c
Update _rules/focus-returns-trigger-9au0ou.md
HelenBurge Jun 8, 2023
83ece03
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 6, 2025
c4da79b
Merge branch 'develop' into HelenBurge-patch-2
carlosapaduarte Feb 6, 2025
302ffdc
Update spelling-ignore.yml
HelenBurge Feb 6, 2025
8f7ce2a
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 6, 2025
24f8a6a
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 6, 2025
969770f
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 6, 2025
eb1cfe4
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
a154fc3
Create focus.md
HelenBurge Feb 7, 2025
9dc8b42
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
dc189e1
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
d05143d
Delete pages/glossary/focus.md
HelenBurge Feb 7, 2025
d593f43
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
d0c1622
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
c760002
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
545599b
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
007c767
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
4709b42
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
102a0bd
Update package.json
HelenBurge Feb 7, 2025
54afb0d
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
0ab8ed8
Update package.json
HelenBurge Feb 7, 2025
9884cc5
Update focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
3f9e26b
Update _rules/focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
541961b
Update _rules/focus-returns-trigger-9au0ou.md
HelenBurge Feb 7, 2025
e8fdf97
Update focus-returns-trigger-9au0ou.md
HelenBurge May 8, 2025
94a8083
Merge branch 'develop' into HelenBurge-patch-2
daniel-montalvo Jun 17, 2025
174d5da
whitespace test commit
dan-tripp-siteimprove Jun 26, 2025
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
144 changes: 144 additions & 0 deletions _rules/focus-returns-trigger-9au0ou.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
---
id: 9au0ou
name: Focus returns to trigger
rule_type: atomic
description: |
This rule checks that when a modal closes the focus returns to the trigger that opened the modal.
accessibility_requirements:
wcag20:2.4.3: # Focus Order (A)
forConformance: true
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
wcag-technique:G59: # Placing the interactive elements in an order that follows sequences and relationships within the content
forConformance: false
failed: not satisfied
passed: further testing needed
inapplicable: further testing needed
input_aspects:
- Accessibility Tree
- DOM Tree
acknowledgments:
authors:
- Helen Burge
previous_authors:
---

## Applicability

This rule applies to any [modal][] that when closed the [focus][] returns to the [trigger][].

## Expectation

On closing the [modal][], the assistive technology [focus][] will return to the item in the owning document that triggered the [modal][].

## Assumptions

There are no assumptions.

## Accessibility Support

There are no accessibility support issues known.

## Background

### Bibliography

- [Understanding Success Criterion 2.4.3: Focus Order](https://www.w3.org/WAI/WCAG21/Understanding/focus-order.html)
- [G59: Placing the interactive elements in an order that follows sequences and relationships within the content](https://www.w3.org/WAI/WCAG21/Techniques/general/G59)

## Test Cases

### Passed

#### Passed Example 1

The button that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the close button in the modal.

```html
Code needed!
```

#### Passed Example 2

The button that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the escape key.

```html
Code needed!
```

#### Passed Example 3

The button that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the cancel button.

```html
Code needed!
```

#### Passed Example 4

The link that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the close button in the modal.

```html
Code needed!
```

#### Passed Example 5

The link that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the escape key.

```html
Code needed!
```

#### Passed Example 6

The link that is activated to open the [modal][] gets the [focus][] returned to it when the [modal][] is dismissed using the cancel button.

```html
Code needed!
```

### Failed

#### Failed Example 1
The button that is activated to open the [modal][] gets the [focus][] returned to the item after it when the [modal][] is dismissed.

```html
Code needed!
```

#### Failed Example 2
The button that is activated to open the [modal][] gets the [focus][] returned to the start of the page when the modal is dismissed.

```html
Code needed!
```

#### Failed Example 3
The link that is activated to open the [modal][] gets the [focus][] returned to the item after it when the [modal][] is dismissed.

```html
Code needed!
```

#### Failed Example 4
The link that is activated to open the [modal][] gets the [focus][] returned to the start of the page when the modal is dismissed.

```html
Code needed!
```

### Inapplicable

#### Inapplicable Example 1
TBC

```html
Code needed!
```

[trigger]: #trigger 'Definition of trigger'
[focus]: #focus 'Definition of focus'
[html]: #namespaced-element
[modal]: https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/