diff --git a/html-aam/index.html b/html-aam/index.html index 6ba045f20..8bcf4b0c1 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -6964,7 +6964,520 @@

`table`

Computed Role -
Use WAI-ARIA mapping
+
+

To compute the role given table element `element`:

+
    +
  1. +

    If element is in not being rendered, return `table`.

    +
    +

    Tables which are not rendered are unlikely to be used for layout, but could be present to supplement otherwise inaccessible graphics.

    +
    +
    + +
    +
  2. +
  3. +

    If element is editable, return `table`.

    +
    +

    Tables which are in an editable state need to act as data tables to allow for rich text editors to create and edit tables which otherwise might have insufficient rows or columns to be considered a table.

    +
    +
    + +
    +
  4. +
  5. +

    If element has a `datatable` attribute whose value is `"0"`, return `table`

    +
    +

    This is a nonstandard attribute used to force tables to be as such. It should be avoided, as `role=table` should be sufficient.

    +
    +
    + +
    +
  6. +
  7. +

    If element has a `summary` attribute whose value is not the empty string, return `table`.

    +
    +

    The `summary` attribute is deprecated, this is here for completeness & web compatibility.

    +
    +
    + +
    +
  8. +
  9. +

    If element has a `rules` attribute whose value is not the empty string, return `table`.

    +
    +

    The `rules` attribute is deprecated, this is here for completeness & web compatibility.

    +
    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  10. +
  11. +

    If element has a `aria-rowcount` attribute whose value a positive integer greater than 0, return `table`.

    +
    + +
    +
  12. +
  13. +

    If element has a `aria-colcount` attribute whose value a positive integer greater than 0, return `table`.

    +
    + +
    +
  14. +
  15. Let row_count be 0.
  16. +
  17. Let column_count be 0.
  18. +
  19. Let cell_count be 0.
  20. +
  21. Let cells_with_borders be 0.
  22. +
  23. Let cells_with_top_border be 0.
  24. +
  25. Let cells_with_right_border be 0.
  26. +
  27. Let cells_with_bottom_border be 0.
  28. +
  29. Let cells_with_left_border be 0.
  30. +
  31. Let cells_with_alternate_background be 0.
  32. +
  33. Let alternating_row_colors be a new list.
  34. +
  35. Let alternating_row_color_count be 0.
  36. +
  37. Let alternating_cell_color_count be 0.
  38. +
  39. Let prev_row_background be null.
  40. +
  41. Let table_background be the result of getting the computed value of the background-color property on element.
  42. +
  43. +

    For each child node table_child of element:

    +
      +
    1. +

      If table_child is a `thead` element, return `table`.

      +
      + +
      +
    2. +
    3. +

      If table_child is a `tfoot` element, return `table`.

      +
      + +
      +
    4. +
    5. +

      If table_child is a `caption` element, return `table`.

      +
      + +
      +
    6. +
    7. +

      If table_child is a `col` element, return `table`.

      +
      + +
      +
    8. +
    9. +

      If table_child is a `colgroup` element, return `table`.

      +
      + +
      +
    10. +
    11. +

      If table_child is a `tbody` element:

      +
        +
      1. +

        For each child node body_child of table_child:

        +
          +
        1. +

          If body_child is a `tr` element:

          +
            +
          1. +

            If row_count is equal to alternating_row_color_count:.

            +
              +
            1. Let row_background be the result of getting the computed value of the background-color property on element.

            2. +
            3. +

              If row_background is not null:

              +
                +
              1. +

                If prev_row_background is not null, and prev_row_background is not equal to row_background, return `table`.

                +
                + +
                +
              2. +
              3. Append row_background to the list alternating_row_colors.

              4. +
              5. Increment alternating_row_color_count.

              6. +
              7. Set prev_row_color to row_color

              8. +
              +
            4. +
            +
          2. +
          3. Increment row_count.

          4. +
          5. +

            If body_child has a role attribute whose value does not include "row", return `html-layout-table`

            +
            + +
            +
          6. +
          7. +

            If row_count is greater than or equal to 20, and column_count is greater than or equal to 2, return `table`.

            +
            +

            This and the following condition are exclusive, while the condition after the following condition is mutually exclusive with these two. The standard should pick one or the other.

            +
            +
            + +
            +
          8. +
          9. +

            If column_count is greater than or equal to 20, and row_count is greater than or equal to 2, return `table`.

            +
            +

            This and the prior condition are exclusive, while the following condition is mutually exclusive with these two. The standard should pick one or the other.

            +
            +
            + +
            +
          10. +
          11. +

            If row_count is greater than or equal to 20, return `table`.

            +
            +

            This and the prior two condition are mutually exclusive. The standard should pick one or the other.

            +
            +
            + +
            +
          12. +
          13. +

            For each child node row_child of body_child:

            +
              +
            1. +

              If row_child is a `th` element, return `table`.

              +
              + +
              +
            2. +
            3. +

              If row_child is a `td` element:

              +
                +
              1. +

                If cell_count is 0 and row_child is in not being rendered, return `table`.

                +
                +

                Tables whose first cell is not being rendered are likely to be data tables, as layout tables will typically use available cells.

                +
                +
                + +
                +
              2. +
              3. +

                If row_child has a `headers` attribute whose value is not empty, return `table`.

                +
                + +
                +
              4. +
              5. +

                If row_child has a `scope` attribute whose value is not empty, return `table`.

                +
                + +
                +
              6. +
              7. +

                If row_child has a `abbr` attribute whose value is not empty, return `table`.

                +
                + +
                +
              8. +
              9. +

                If row_child has a `axis` attribute whose value is not empty, return `table`.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • WebKit
                • +
                • Chrome
                • +
                +
                +
              10. +
              11. +

                If row_child has a `role` attribute whose value is "gridcell", "cell", "columnheader" or "rowheader", return `table`.

                +
                + +
                +
              12. +
              13. +

                If row_child has a `role` attribute whose value is NOT one of "gridcell", "cell", "columnheader" or "rowheader", return `html-layout-table`.

                +
                + +
                +
              14. +
              15. +

                If the result of getting the computed value of the empty-cells property is equal to `hide`, return `table`.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • Chrome
                • +
                • WebKit
                • +
                +
                +
              16. +
              17. If row_count is 1, increment column_count.

              18. +
              19. +

                If column_count is greater than 4, return `table`.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • Chrome
                • +
                • WebKit
                • +
                +
                +
              20. +
              21. Increment cell_count.

              22. +
              23. Let border_top be the result of getting the computed value of the border-top property on row_child.

              24. +
              25. Let border_right be the result of getting the computed value of the border-right property on row_child.

              26. +
              27. Let border_bottom be the result of getting the computed value of the border-bottom property on row_child.

              28. +
              29. Let border_left be the result of getting the computed value of the border-left property on row_child.

              30. + +
              31. +

                If border_top is not null return `table`.

                +
                + +
                +
              32. +
              33. +

                If border_right is not null return `table`.

                +
                + +
                +
              34. +
              35. +

                If border_bottom is not null return `table`.

                +
                + +
                +
              36. +
              37. +

                If border_left is not null return `table`.

                +
                + +
                +
              38. + +
              39. Let has_block_borders be true if border_top and border_bottom are both not null, otherwise false.

              40. +
              41. Let has_inline_borders be true if border_left and border_right are both not null, otherwise false.

              42. +
              43. +

                If either has_inline_borders or has_block_borders are true, increment cells_with_borders.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • Chrome
                • +
                • WebKit
                • +
                +
                +
              44. + +
              45. +

                If cells_with_borders is greater than 10, return `table`.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • Chrome
                • +
                • WebKit
                • +
                +
                +
              46. + +
              47. If border_top is not null increment cells_with_top_border.

              48. +
              49. If border_right is not null increment cells_with_right_border.

              50. +
              51. If border_bottom is not null increment cells_with_bottom_border.

              52. +
              53. If border_left is not null increment cells_with_left_border.

              54. + +
              55. Let cell_background be the result of getting the computed value of the background-color property on row_child.

              56. +
              57. If cell_background is not null, and is not equal to table_background, increment alternating_cell_color_count.

              58. +
              59. +

                If alternating_cell_color_count is greater than 10, return `table`.

                +
                +
                  +
                • Firefox does not include this heuristic.
                • +
                • Chrome
                • +
                • WebKit
                • +
                +
                +
              60. +
              +
            4. +
            +
          14. +
          +
        2. +
        +
      2. +
      +
    12. +
    +
  44. +
  45. +

    If row_count is less than 2, return `html-layout-table`.

    +
    + +
    +
  46. +
  47. +

    If column_count is less than 2, return `html-layout-table`.

    +
    + +
    +
  48. +
  49. +

    If cell_count is less than 2, return `html-layout-table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  50. +
  51. +

    Let minimum_styled_borders by the result of dividing cell_count by 2.

    +
  52. +
  53. +

    If the cells_with_borders is greater than or equal to minimum_styled_borders, return `table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  54. +
  55. +

    If the cells_with_top_border is greater than or equal to minimum_styled_borders, return `table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  56. +
  57. +

    If the cells_with_right_border is greater than or equal to minimum_styled_borders, return `table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  58. +
  59. +

    If the cells_with_bottom_border is greater than or equal to minimum_styled_borders, return `table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  60. +
  61. +

    If the cells_with_left_border is greater than or equal to minimum_styled_borders, return `table`.

    +
    +
      +
    • Firefox does not include this heuristic.
    • +
    • Chrome
    • +
    • WebKit
    • +
    +
    +
  62. +
  63. +

    If the result of getting the first element that is a descendants of element, whose local name is one of `embed`, `object`, `iframe`, is not null, return `html-layout-table`.

    +
    + +
    +
  64. +
  65. Return `html-layout-table`.

  66. +
+
@@ -16688,7 +17201,7 @@

Accessible Description Computation

-