From ee133ddf82768834345c61b1f2e18687e89f8443 Mon Sep 17 00:00:00 2001 From: sideshowbarker Date: Mon, 18 Nov 2024 08:34:45 +0900 Subject: [PATCH] =?UTF-8?q?[accname]=20Do=20=E2=80=9CAriaLabel=E2=80=9D=20?= =?UTF-8?q?substep=20before=20=E2=80=9CEmbedded=20Control=E2=80=9D=20subst?= =?UTF-8?q?ep?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change reorders the “AriaLabel” substep in the set of steps in the accname Computation algorithm such that it occurs before the “Embedded Control” substep, rather than after that step. Otherwise, without this change, the spec as written doesn’t match the behavior as implemented in existing UAs, nor the corresponding requirements at https://w3c.github.io/html-aam/#accname-computation in the HTML-AAM spec: > If the [embedded-control] 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. (Which is the first step in accname computation for each control) Also, without this change, the spec doesn’t match the expectations in http://wpt.fyi/results/accname/name/comp_label.html for the “input with label for association is superceded by aria-label” subtest. --- accname/index.html | 58 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/accname/index.html b/accname/index.html index 773fac4fa..e741f90cb 100644 --- a/accname/index.html +++ b/accname/index.html @@ -546,6 +546,35 @@

Computation steps

+
  • + 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. +
    3. Otherwise, return the value of aria-label.
    4. +
    + +
  • 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 @@ -577,35 +606,6 @@

    Computation steps

    </label>
  • -
  • - 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. -
    3. Otherwise, return the value of aria-label.
    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