From 61b428dd4d4a41fd5cadc6dc3e4a64f9396431be Mon Sep 17 00:00:00 2001 From: Matt King Date: Wed, 11 Jul 2018 02:40:48 -0700 Subject: [PATCH] Layout Grid Examples: Fix problems described in issue 758 modified examples/grid/LayoutGrids.html to fix the following problems described in issue #758. Problem 1: tabindex="-1" is not only applied to span elements. It is applied to div as well. Resolution 1: Updated documentation of tabindex. Made it consistent with descriptions of roving tabindex in other examples. Added documentation of tabindex=0 as well. Problem 2: The definition of the word "cell" is not consistent between the attribute table and the keyboard table. Resolution 2: Added a note above the keyboard table describing how cell is used. --- examples/grid/LayoutGrids.html | 36 ++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/examples/grid/LayoutGrids.html b/examples/grid/LayoutGrids.html index e5e35f987e..2ffa1bd1ee 100644 --- a/examples/grid/LayoutGrids.html +++ b/examples/grid/LayoutGrids.html @@ -447,6 +447,11 @@

Other Features

Keyboard Support

+

+ NOTE: The following table describes keyboard commands that move focus among grid cells. + In the examples on this page, some cells contain a single focusable widget, and if a cell contains a widget, the cell is not focusable; the widget receives focus instead of the cell. + So, when a description says a command moves focus to a cell, the command may either focus the cell or a widget inside the cell. +

@@ -636,17 +641,20 @@

Role, Property, State, and Tabindex Attributes

- + - + @@ -656,8 +664,24 @@

Role, Property, State, and Tabindex Attributes

+ + + + + +
gridcell spanspan, div Identifies the element containing the content for a single cell.
tabindex="-1"spanspan, div
    -
  • Makes the cell focusable.
  • -
  • Applied only to cells that do not contain an interactive widget that consumes arrow keys, such as a link or button.
  • +
  • Makes the cell focusable and excludes it from the page Tab sequence.
  • +
  • Applied to all cells that do not contain an interactive widget that consumes arrow keys, such as a link or button.
  • +
  • Changed dynamically to 0 by the JavaScript when the cell is to be included in the page Tab sequence.
  • +
  • At any given time, only one of the cells or widgets within the grid is in the page Tab sequence.
  • +
  • This approach to managing focus is described in the section on roving tabindex.
Widgets inside cells
    -
  • Makes the widget, e.g., link or button, focusable.
  • -
  • Keyboard navigation and clicks focus the widget if the containing cell is not focusable.
  • +
  • Makes the widget, e.g., link or button, focusable and excludes it from the page Tab sequence.
  • +
  • Clicks and keyboard commands that move focus inside the grid can focus widgets if the containing cell is not focusable.
  • +
  • Changed dynamically to 0 by the JavaScript when the widget is to be included in the page Tab sequence.
  • +
  • At any given time, only one of the cells or widgets within the grid is in the page Tab sequence.
  • +
  • This approach to managing focus is described in the section on roving tabindex.
  • +
+
tabindex="0"span, div, or if present, widget inside cell +
    +
  • Makes the element focusable and includes it in the page Tab sequence.
  • +
  • Set dynamically by the JavaScript when the element is to be included in the page Tab sequence.
  • +
  • At any given time, only one element within the grid is in the page Tab sequence.
  • +
  • This approach to managing focus is described in the section on roving tabindex.