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

6cfa84: Modify pass example 4 to be more realistic, using a dialog #1819

Merged
merged 19 commits into from Jun 16, 2022
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 10 additions & 2 deletions _rules/aria-hidden-no-focusable-content-6cfa84.md
Expand Up @@ -100,10 +100,18 @@ This `input` element is not [focusable][] because of the `disabled` attribute.
This `a` element is not [focusable][] because it moves focus to the `input` element whenever it receives focus.
tombrunet marked this conversation as resolved.
Show resolved Hide resolved

```html
<div role="dialog" aria-label="Sample Modal" aria-modal="true" style="border: solid black 1px; padding: 1rem;">
<label>Some input <input id="dialogFirst"></label><br />
<button>Close button</button>
tombrunet marked this conversation as resolved.
Show resolved Hide resolved
</div>
<div aria-hidden="true">
<a href="/" style="position:absolute; top:-999em" onfocus="document.querySelector('input').focus()">First link</a>
<a href="#" id="sentinelAfter" style="position:absolute; top:-999em">Focus sentinel</a>
tombrunet marked this conversation as resolved.
Show resolved Hide resolved
</div>
<input />
<script>
sentinelAfter.addEventListener("focus", () => {
tombrunet marked this conversation as resolved.
Show resolved Hide resolved
dialogFirst.focus();
});
</script>
```

### Failed
Expand Down