w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.09k stars 242 forks source link

Understanding for 2.4.3 Focus Order has contradiction #1147

Open bruce-usab opened 4 years ago

bruce-usab commented 4 years ago

The first sentence of the third paragraph of Intent from Understanding 2.4.3 contradicts the first Example. Follows is the excerpts, emphasis added:

An example of keyboard navigation that is not the sequential navigation addressed by this Success Criterion is using arrow key navigation to traverse a tree component.

  1. On a web page that contains a tree of interactive controls, the user can use the up and down arrow keys to move from tree node to tree node.

Also, Understanding should make clear that the SC covers reversing Focus Order, but with the caveat that reverse focus order is not required to mirror the forward focus order.

Finally, it like an odd omission that we do not include tabbing through a web page (or form) as an explicit example when that is probably the first thing people think of. The second paragraph of Intent does include the notion of tabbing order but that is it.

The edits to Understanding that I am proposing:

  1. Add sentence to end of second paragraph of Intent about reverse tab order.
  2. Delete not from first sentence of third paragraph from Intent (excerpt above). Add a sentence about the SC applying to the Up and Down arrows, but not the collapse/expand function of the right and left arrow keys.
  3. Add a Tab and Shift-Tab example as the first item in the list of examples.
cstrobbe commented 2 years ago

The third paragraph of "Intent" could benefit from clarifying why using the arrow keys to traverse nodes in a tree is not considered sequential navigation. The best explanation I can come up with is that you don't necessarily traverse every branch of the tree and therefore don't move through the entire "sequence" of nodes in the tree structure.

At the end of the second paragraph, I would replace the reference to HTML 4.01, which has been marked as a "superseded recommendation" by the W3C, with a reference to section 6.6 Focus in HTML 5.

How long should the addition about tabbing and reverse tab order be? Something like the following?

In web content that does not contain JavaScript-based user interface components, the Tab key moves the focus through keyboard-accessible elements (links, form controls, elements with a tabindex value of 0 and a few other elements) in the order that they appear in the document's node tree. Pressing Tab moves the focus forward, while pressing Shift Tab moves focus backward.

If the "not" in the first sentence of the third paragraph is indeed an error, I would reword it as follows: "An example of sequential navigation is ...". However, I cannot imagine that the intention was to write: "An example of keyboard navigation that is the sequential navigation addressed by this Success Criterion is": that is simply too convoluted for an affirmative sentence. (I mean affirmative in a linguistic sense.) I suspect that the syntax is so convoluted because it is negative instead of affirmative. But in that case, the text should explain why traversing a tree using the arrow keys is not "sequential navigation".

For the new example that may be used as the first example in the list, I suggest the following:

A web page uses native HTML elements, does not use JavaScript-based user interface components and does not use CSS to position elements in a way that deviates from the source code order. When the user presses the Tab key, the focus moves through the links and form elements on the page moving left to right and top to bottom in a way that matches the reading order of the language. (The content is not in a language that is read right to left.) When the user presses Shift Tab, the focus moves in the reverse order.