From cf77505204bca796ecda6f698b8053f363a3415f Mon Sep 17 00:00:00 2001 From: James Nurthen Date: Sat, 4 Nov 2023 14:32:18 -0700 Subject: [PATCH] Editorial: `name` not allowed on a `li` element (#219) Co-authored-by: James Craig --- index.html | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/index.html b/index.html index 6db7cd9..b1eac67 100644 --- a/index.html +++ b/index.html @@ -357,10 +357,10 @@

Terminology

Computation steps

The text alternative for a given element is computed as follows:

    -
  1. Initialization: Set the root node to the given element, the current node to the root node, and the total accumulated text to the empty string (""). If the root node's role prohibits naming, return the empty string ("").
  2. -
  3. Computation: Compute the text alternative for the current node: +
  4. Initialization: Set the root node to the given element, the current node to the root node, and the total accumulated text to the empty string (""). If the root node's role prohibits naming, return the empty string ("").
  5. +
  6. Computation: Compute the text alternative for the current node:
      -
    1. Hidden Not Referenced: If the current node is [=element/hidden=] and is: +
    2. Hidden Not Referenced: If the current node is [=element/hidden=] and is:
      1. Not part of an aria-labelledby or aria-describedby traversal, where the node directly referenced by that relation was hidden.
      2. Nor part of a native host language text alternative element (e.g. label in HTML) or attribute traversal, where the root of that traversal was hidden.
      3. @@ -396,17 +396,17 @@

        Computation steps

        </element2> -
      4. LabelledBy: Otherwise, if the current node has an aria-labelledby [=attribute=] that contains at least one valid IDREF, and the current node is not already part of an ongoing aria-labelledby or aria-describedby traversal, process its IDREFs in the order they occur: +
      5. LabelledBy: Otherwise, if the current node has an aria-labelledby [=attribute=] that contains at least one valid IDREF, and the current node is not already part of an ongoing aria-labelledby or aria-describedby traversal, process its IDREFs in the order they occur:
          -
        1. Set the accumulated text to the empty string.
        2. -
        3. For each IDREF: +
        4. Set the accumulated text to the empty string.
        5. +
        6. For each IDREF:
            -
          1. Set the current node to the node referenced by the IDREF.
          2. -
          3. LabelledBy Recursion: Compute the text alternative of the current node beginning with the overall Computation step. Set the result to that text alternative.
          4. -
          5. Append a space character and the result to the accumulated text.
          6. +
          7. Set the current node to the node referenced by the IDREF.
          8. +
          9. LabelledBy Recursion: Compute the text alternative of the current node beginning with the overall Computation step. Set the result to that text alternative.
          10. +
          11. Append a space character and the result to the accumulated text.
        7. -
        8. Return the accumulated text if it is not the empty string ("").
        9. +
        10. Return the accumulated text if it is not the empty string ("").

        The result of LabelledBy Recursion in combination with Hidden Not Referenced means that user agents MUST include all nodes in the subtree as part of the accessible name or accessible description, when the node referenced by aria-labelledby or aria-describedby is hidden.

        @@ -422,7 +422,7 @@

        Computation steps

      6. -
      7. Embedded Control: Otherwise, if the current node is a control embedded within the label (e.g. any element directly referenced by aria-labelledby) for another widget, where the user can adjust the embedded control's value, then return the embedded control as part of the text alternative in the following manner: +
      8. Embedded Control: Otherwise, if the current node is a control embedded within the label (e.g. any element directly referenced by aria-labelledby) for another widget, where the user can adjust the embedded control's value, then return the embedded control as part of the text alternative in the following manner:
        1. Textbox: If the embedded control has role textbox, return its value.
        2. Combobox/Listbox: If the embedded control has role combobox or listbox, return the text alternative of the chosen option.
        3. @@ -442,7 +442,7 @@

          Computation steps

          </label> -
        4. AriaLabel: Otherwise, if the current node has an aria-label [=attribute=] whose value is not undefined, not the empty string, nor, when trimmed of [=ascii whitespace|whitespace=], is not the empty string: +
        5. AriaLabel: Otherwise, if the current node has an aria-label [=attribute=] whose value is not undefined, not the empty string, nor, when trimmed of [=ascii whitespace|whitespace=], is not the empty string:
          1. If traversal of the current node is due to recursion and the current node is an embedded control, ignore aria-label and skip to rule Embedded Control.
          2. Otherwise, return the value of aria-label.
          3. @@ -462,38 +462,38 @@

            Computation steps

            </ul> -
          4. Host Language Label: Otherwise, if the current node's native markup provides an [=attribute=] (e.g. alt) or [=element=] (e.g. HTML label or SVG title) that defines a text alternative, return that alternative in the form of a flat string as defined by the host language, unless the element is marked as presentational (role="presentation" or role="none"). +
          5. Host Language Label: Otherwise, if the current node's native markup provides an [=attribute=] (e.g. alt) or [=element=] (e.g. HTML label or SVG title) that defines a text alternative, return that alternative in the form of a flat string as defined by the host language, unless the element is marked as presentational (role="presentation" or role="none").
            See HTML-AAM, SVG-AAM, or other host language documentation for more information on markup that defines a text alternative.

            For example, in HTML, the img element's alt attribute defines a text alternative string, and the label element provides text for the referenced form element. In SVG2, the desc and title elements provide a description of their parent element.

          6. -
          7. Name From Content: Otherwise, if the current node's role allows name from content, or if the current node is referenced by aria-labelledby, aria-describedby, or is a native host language text alternative [=element=] (e.g. label in HTML), or is a descendant of a native host language text alternative [=element=]: +
          8. Name From Content: Otherwise, if the current node's role allows name from content, or if the current node is referenced by aria-labelledby, aria-describedby, or is a native host language text alternative [=element=] (e.g. label in HTML), or is a descendant of a native host language text alternative [=element=]:
              -
            1. Name From Content Reset: Set the accumulated text to the empty string.
            2. -
            3. Name From Generated Content: Check for CSS generated textual content associated with the current node and include it in the accumulated text. The CSS ::before and ::after pseudo elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model. +
            4. Name From Content Reset: Set the accumulated text to the empty string.
            5. +
            6. Name From Generated Content: Check for CSS generated textual content associated with the current node and include it in the accumulated text. The CSS ::before and ::after pseudo elements [[!CSS2]] can provide textual content for [=element|elements=] that have a content model.
              1. For ::before pseudo elements, User agents MUST prepend CSS textual content, without a space, to the textual content of the current node.
              2. For ::after pseudo elements, User agents MUST append CSS textual content, without a space, to the textual content of the current node.
            7. -
            8. Name From Each Child: For each child node of the current node: +
            9. Name From Each Child: For each child node of the current node:
                -
              1. Set the current node to the child node.
              2. -
              3. Compute the text alternative of the current node beginning with the overall Computation step. Set the result to that text alternative.
              4. -
              5. Append the result to the accumulated text.
              6. +
              7. Set the current node to the child node.
              8. +
              9. Compute the text alternative of the current node beginning with the overall Computation step. Set the result to that text alternative.
              10. +
              11. Append the result to the accumulated text.
            10. -
            11. Return the accumulated text if it is not the empty string ("").
            12. +
            13. Return the accumulated text if it is not the empty string ("").

            Important: Each [=nodes|node=] in the subtree is consulted only once. If text has been collected from a descendant, but is referenced by another IDREF in some descendant node, then that second, or subsequent, reference is not followed. This is done to avoid infinite loops.

            This step can apply to the child nodes themselves, which means the computation is recursive and results in text collected from all the elements in the current node's subtree, no matter how deep it is. However, any given descendant [=nodes|node's=] text alternative can result from higher precedent markup described in steps B through D above, where "Namefrom: author" attributes provide the text alternative for the entire subtree.

          9. -
          10. Text Node: Otherwise, if the current node is a Text [=Node=], return its textual contents.
          11. -
          12. Recursive Name From Content: Otherwise, if the current node is a descendant of an element whose Accessible Name or Accessible Description is being computed, and contains descendants, proceed to Name From Content Reset.
          13. -
          14. Tooltip: Otherwise, if the current node has a Tooltip attribute, return its value. +
          15. Text Node: Otherwise, if the current node is a Text [=Node=], return its textual contents.
          16. +
          17. Recursive Name From Content: Otherwise, if the current node is a descendant of an element whose Accessible Name or Accessible Description is being computed, and contains descendants, proceed to Name From Content Reset.
          18. +
          19. Tooltip: Otherwise, if the current node has a Tooltip attribute, return its value.

            Tooltip attributes are used only if nothing else, including subtree content, has provided results.