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

DRAFT SC2-1-2-no-keyboard-trap-non-standard-navigation and SC2-1-2-no-keyboard-trap-standard-navigation.md #142

Merged
merged 40 commits into from
Jun 27, 2018

Conversation

geirsf
Copy link

@geirsf geirsf commented May 25, 2018

Draft version of:

And added contributors to contributors.yml

- SC2-1-2-no-keyboard-trap-non-standard-navigation (current)

description: |
This rule checks if the user is advised on a method for non-standard keyboard navigation to navigate through focusable content on a web page without becoming trapped in any element.

This comment was marked as resolved.


### Expectation 1

For each target element help information is [visible on the page][] and [exposed to assistive technologies][] or can be navigated to from within the keyboard trap.

This comment was marked as resolved.


Carlos Duarte:
name: Carlos Duarte
site: https://github.com/carlosapaduarte
Copy link
Member

Choose a reason for hiding this comment

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

Please leave this file in alphabetical order.


### Applicability

The rule applies to any HTML or SVG element on a web page that is [focusable][] and reachable through [sequential focus navigation](https://www.w3.org/TR/html/editing.html#sequential-focus-navigation).
Copy link
Member

Choose a reason for hiding this comment

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

Can we remove "[focusable][] and " from this sentence? It seems to me that any element that can be reached through sequential focus navigation, by definition is focusable. Am I missing something?


For each target element help information is [visible on the page][] and [exposed to assistive technologies][] or can be navigated to from within the keyboard trap.

**Note**: As per Success Criterion 2.1.1 Keyboard the help information should be accessible through a keyboard interface. This however is the test subject for another ACT rule.
Copy link
Member

Choose a reason for hiding this comment

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

Add "WCAG 2.0" before "Success Criterion".

Copy link
Member

Choose a reason for hiding this comment

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

Add a link too


### Expectation 2

The help information explains how to cycle to the browser UI, or on how to get to a point from where it is possible to cycle to the browser UI, using [standard keyboard navigation][].
Copy link
Member

Choose a reason for hiding this comment

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

"cycle to the browser UI" is a bit "jargony". Can we find a more plain language term for this?

Copy link
Member

Choose a reason for hiding this comment

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

I would suggest putting "using standard keyboard navigation" earlier in the sentence.

Copy link
Member

Choose a reason for hiding this comment

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

"how to get to a point from where you can cycle to the browser UI"

## Assumptions

- The WCAG success criterion applies to all content where focus can be moved to through keyboard navigation.
- It is not possible to use unmodified arrow or tab keys, or other standard exit methods to move focus away.
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why this would be an assumption.

Copy link
Member

Choose a reason for hiding this comment

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

Delete this line

### Passed

```html
<!-- Standard link and button -->
Copy link
Member

Choose a reason for hiding this comment

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

This shouldn't pass. There are no instructions.

```

```html
<!-- Hidden link and button -->
Copy link
Member

Choose a reason for hiding this comment

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

Same here, no instructions, shouldn't pass.


### Applicability

The rule applies to any HTML or SVG element on a web page that is [focusable][] by keyboard.

This comment was marked as resolved.

```

[focusable]: ../pages/algorithms/focusable.html
[standard keyboard navigation]: ../pages/algorithms/standard-keyboard-navigation.html
Copy link
Member

Choose a reason for hiding this comment

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

This page is still missing.

Copy link
Collaborator

Choose a reason for hiding this comment

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

We will make a separate pull request for the algorithm Standard keyboard navigation.

## Assumptions

- The WCAG success criterion applies to all content where focus can be moved to through keyboard navigation.
- It is possible to use unmodified arrow or tab keys, or other standard exit methods to move focus away.

This comment was marked as resolved.


- The WCAG success criterion applies to all content where focus can be moved to through keyboard navigation.
- It is possible to use unmodified arrow or tab keys, or other standard exit methods to move focus away.
- The focus order in keyboard navigation is cyclical, not linear, meaning that the focus order will cycle to the first/last element when it moves away from the last/first element.

This comment was marked as resolved.

This comment was marked as resolved.


```html
<a href ="#" style="visibility: hidden;">Link 1</a>
<button class="target" style="visibility: hidden;">Button1</button>

This comment was marked as resolved.


For each target element help information is [visible on the page][] and [exposed to assistive technologies][] or can be navigated to from within the keyboard trap.

**Note**: As per Success Criterion 2.1.1 Keyboard the help information should be accessible through a keyboard interface. This however is the test subject for another ACT rule.

This comment was marked as resolved.


### Expectation 1

For each target element help information is [visible on the page][] and [exposed to assistive technologies][] or can be navigated to from within the keyboard trap.

This comment was marked as resolved.

This comment was marked as resolved.

var trapOn = false ;
</script>

<p class="target">Press the M-key to Exit</p>

This comment was marked as resolved.

<p class="target">Press the M-key to Exit</p>
<button id="btn2" class="target" onkeydown="(function(e){ if (e.keyCode === 77){trapOn=false;document.getElementById('link2').focus();}})(event)" onblur="(function(e){ if(trapOn){document.getElementById('btn1').focus();}})(event)">Button 2</button>
<a id="link2" href="#">Link 2</a>
````

This comment was marked as resolved.

<button id="btn2" class="target" onkeydown="(function(e){ if (e.keyCode === 77){trapOn=false;document.getElementById('link2').focus();}})(event)" onblur="(function(e){ if(trapOn){document.getElementById('btn1').focus();}})(event)">Button 2</button>
<a id="link2" href="#">Link 2</a>
````

This comment was marked as resolved.

This comment was marked as resolved.

@jeeyyy
Copy link
Collaborator

jeeyyy commented Jun 4, 2018

@annethyme @geirsf - please go through comments.

@annethyme annethyme added this to Drafts (Needs Review) in Rules Progress Overview Jun 12, 2018
Shadi Abou-Zahra:
name: Shadi Abou-Zahra
site: https://github.com/nitedog

Brian Bors:
Copy link
Collaborator

Choose a reason for hiding this comment

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

The names are to be in alphabetical order.

@geirsf geirsf merged commit caacbf3 into act-rules:master Jun 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Rules Progress Overview
Drafts (Needs Review)
Development

Successfully merging this pull request may close these issues.

None yet

6 participants