From ebdf3a654f4d97a9a6322ba636533e02f8978324 Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 22 Oct 2024 13:56:07 -0400 Subject: [PATCH 1/6] Update: legend to provide name to optgroup In regards to the updated content model for the select element and its allowed children, an `optgroup` can have a `legend` element as its first child, and this `legend` needs to be able to name the `optgroup` similarly to how a `legend` names a `fieldset`. see: https://github.com/whatwg/html/pull/10586 --- html-aam/index.html | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index ca3f951e6..4594a1017 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -4647,7 +4647,10 @@

`legend`

Roles: `ROLE_SYSTEM_STATICTEXT`; `IA2_ROLE_LABEL`
-
Relations: `IA2_RELATION_LABEL_FOR` with the parent `fieldset`
+
+ Relations: `IA2_RELATION_LABEL_FOR` with the parent `fieldset` + or `optgroup` +
@@ -4657,7 +4660,8 @@

`legend`

Other properties: The `LabeledBy` property for the parent - `fieldset` points to the UIA element for the `legend` element. + `fieldset` or `optgroup` points to the + UIA element for the `legend` element.
@@ -4667,7 +4671,8 @@

`legend`

Role: `ATK_ROLE_LABEL`
Relations: - `ATK_RELATION_LABEL_FOR` with parent `fieldset` element + `ATK_RELATION_LABEL_FOR` with parent `fieldset` + or `optgroup` element
From 5fcc764dc04d6653ade2e8a1b9ab55cf9f02ed6e Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Tue, 22 Oct 2024 14:48:00 -0400 Subject: [PATCH 2/6] naming steps for optgroup open question in https://github.com/whatwg/html/pull/10586#issuecomment-2429931537 about what should take priority - legend or optgroup's label attr. if both end up being allowed / render - then one of these could be added to the accDescription computation - instead of ignoring one or combining them into one long name. --- html-aam/index.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/html-aam/index.html b/html-aam/index.html index 4594a1017..3b19ed432 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -16152,6 +16152,26 @@

`fieldset` Element Accessible Name Computation

  • Otherwise, there is no accessible name.
  • +
    +

    `optgroup` Element Accessible Name Computation

    +
      +
    1. + If the `optgroup` element has an `aria-label` or an `aria-labelledby` attribute the + accessible name is to be calculated using the algorithm defined in + Accessible Name and Description: Computation and API Mappings. +
    2. +
    3. + If the accessible name is still empty, then: if the `optgroup` element has a + child that is a legend element, then use the subtree of the first such element. +
    4. +
    5. + If the accessible name is still empty, then: if the `optgroup` element has a + label attribute, then use that attribute. +
    6. +
    7. If the accessible name is still empty, then:, if the `optgroup` element has a `title` attribute, then use that attribute.
    8. +
    9. Otherwise, there is no accessible name.
    10. +
    +

    `output` Element Accessible Name Computation

      From b9352bf2c125d04d00fe38dcefc5a1235eed5e4c Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 30 Oct 2024 17:52:37 -0400 Subject: [PATCH 3/6] Update html-aam/index.html Co-authored-by: Keith Cirkel --- html-aam/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/html-aam/index.html b/html-aam/index.html index 3b19ed432..65f34955d 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -16168,7 +16168,7 @@

      `optgroup` Element Accessible Name Computation

      If the accessible name is still empty, then: if the `optgroup` element has a label attribute, then use that attribute. -
    1. If the accessible name is still empty, then:, if the `optgroup` element has a `title` attribute, then use that attribute.
    2. +
    3. If the accessible name is still empty, then: if the `optgroup` element has a `title` attribute, then use that attribute.
    4. Otherwise, there is no accessible name.
    From ae5840d683f9e119c607b118dca0c39bdbd06f8f Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 15:02:19 -0400 Subject: [PATCH 4/6] update optgroup naming order and add desc calc --- html-aam/index.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 65f34955d..490a20d50 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -16146,7 +16146,7 @@

    `fieldset` Element Accessible Name Computation

  • If the accessible name is still empty, then: if the `fieldset` element has a - child that is a legend element, then use the subtree of the first such element. + child that is a legend element, then use the subtree of the first such element in the accessibility tree.
  • If the accessible name is still empty, then:, if the `fieldset` element has a `title` attribute, then use that attribute.
  • Otherwise, there is no accessible name.
  • @@ -16162,13 +16162,15 @@

    `optgroup` Element Accessible Name Computation

  • If the accessible name is still empty, then: if the `optgroup` element has a - child that is a legend element, then use the subtree of the first such element. + label attribute use the rendered value of that attribute.
  • If the accessible name is still empty, then: if the `optgroup` element has a - label attribute, then use that attribute. + child that is a legend element, then use the subtree of the first such element in the accessibility tree. +
  • +
  • + If the accessible name is still empty, then: if the `optgroup` element has a `title` attribute, then use that attribute.
  • -
  • If the accessible name is still empty, then: if the `optgroup` element has a `title` attribute, then use that attribute.
  • Otherwise, there is no accessible name.
  • @@ -16374,6 +16376,16 @@

    Accessible Description Computation

    text equivalent computation of the subtree of the first `caption` element if it was not used as the accessible name. +
  • + an `optgroup` element which has a visible label rendered by its `label` attribute, a child `legend` element, or both: +
      +
    1. use the value of the `label` attribute if it was not used as the accessible name
    2. +
    3. use the text equivalent computation of the subtree of the first `legend` element if it was not used as the + accessible name.
    4. +
    5. or if both the `label` attribute and `legend` element were used, concatenate the text equivalent computation of each by DOM order, delimited by spaces, + if neither were used as the accessible name.
    6. +
    +
  • a `summary` element, use the text equivalent computation of its subtree if it was not used as the accessible name. From e543559544db8ef519ec2ff1428f73bf7046433a Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Fri, 1 Nov 2024 15:16:32 -0400 Subject: [PATCH 5/6] don't be redundant... --- html-aam/index.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index 490a20d50..b167e03b8 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -16382,8 +16382,8 @@

    Accessible Description Computation

  • use the value of the `label` attribute if it was not used as the accessible name
  • use the text equivalent computation of the subtree of the first `legend` element if it was not used as the accessible name.
  • -
  • or if both the `label` attribute and `legend` element were used, concatenate the text equivalent computation of each by DOM order, delimited by spaces, - if neither were used as the accessible name.
  • +
  • or if both the `label` attribute and `legend` element were used, and their concatenate the text equivalent computation of each by DOM order, delimited by spaces, + if neither were used as the accessible name, and so long as the values of text equivalent computation of each do not match.
  • From 3a089129d9be6d2d3e34de5233678611487ebefa Mon Sep 17 00:00:00 2001 From: Scott O'Hara Date: Wed, 11 Dec 2024 14:38:18 -0500 Subject: [PATCH 6/6] Update accessible name steps for optgroup revised to incorporate latest decisions on how the naming/desc should work --- html-aam/index.html | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/html-aam/index.html b/html-aam/index.html index b167e03b8..65011be53 100644 --- a/html-aam/index.html +++ b/html-aam/index.html @@ -16162,11 +16162,11 @@

    `optgroup` Element Accessible Name Computation

  • If the accessible name is still empty, then: if the `optgroup` element has a - label attribute use the rendered value of that attribute. + child that is a legend element, then use the subtree of the first such element in the accessibility tree.
  • - If the accessible name is still empty, then: if the `optgroup` element has a - child that is a legend element, then use the subtree of the first such element in the accessibility tree. + If the accessible name is still empty, and there is no child `legend` element, then: + if the `optgroup` element has a label attribute use the value of that attribute, which renders as the visible label of the `optgroup`.
  • If the accessible name is still empty, then: if the `optgroup` element has a `title` attribute, then use that attribute. @@ -16379,11 +16379,14 @@

    Accessible Description Computation

  • an `optgroup` element which has a visible label rendered by its `label` attribute, a child `legend` element, or both:
      -
    1. use the value of the `label` attribute if it was not used as the accessible name
    2. -
    3. use the text equivalent computation of the subtree of the first `legend` element if it was not used as the - accessible name.
    4. -
    5. or if both the `label` attribute and `legend` element were used, and their concatenate the text equivalent computation of each by DOM order, delimited by spaces, - if neither were used as the accessible name, and so long as the values of text equivalent computation of each do not match.
    6. +
    7. + use the value of the `label` attribute if it was not used as the + accessible name +
    8. +
    9. + or use the text equivalent computation of the subtree of the + first `legend` element if it was not used as the accessible name. +