W3C home > Mailing lists > Public > public-aria@w3.org > May 2018

Sanity checking a test case with description from non-rendered contents

From: Joanmarie Diggs <jdiggs@igalia.com>
Date: Wed, 9 May 2018 21:29:16 -0400
To: ARIA Working Group <public-aria@w3.org>
Message-ID: <2767d96b-b8a0-4afe-5b56-b417f3ea28ee@igalia.com>
Hi all.

I have another test case which is in need of sanity checking. Because
the test case is super big, I'm going to just include an abbreviated
form in this message. The full test case can be found here:

    .hidden { display: none; }
    <input id="test" type="text" aria-describedby="descId" />
  <div class="hidden">
    <div id="descId">
    <!-- lots of elements removed -->
          <td style="visibility:hidden;"><div>in</div></td>
          <td><div style="display:none;">the world</div></td>
          <td>are my marbles?</td>

The expected results of the full test case is "My name is Eli the weird.
(QED) Where are my marbles?" In other words, don't include the
non-rendered cell content. I get that. But my question is: Would we even
reach that table to make that consideration? My conclusion is no, we
would not.

2B, second bullet, states that we need to process the IDREFs (i.e.
descId) beginning with step 2. So let's do that.

Looking at the algorithm, step 2A says:

    If the current node is hidden and is not directly referenced
    by aria-labelledby or aria-describedby, nor directly referenced
    by a native host language text alternative element (e.g. label
    in HTML) or attribute, return the empty string.

In addition, hidden is defined in the Accname spec as:

    Indicates that the element is not visible, perceivable, or
    interactive to any user. An element is considered hidden if
    it or any one of its ancestor elements is not rendered or is
    explicitly hidden.

The current node (descId) is hidden as defined above as a result of the
containing div with display:none causing it to not be rendered. However,
descId is "directly referenced" by aria-describedby. Thus 2A doesn't
apply and we contininue on.

Steps 2B through 2E don't seem to apply. 2F does because the current
node is referenced by aria-described by. According to 2F we need to: Set
the accumulated text to the empty string, add in any CSS generated
content, and then for each child of the current node, calculate the text
beginning with step 2 and append the result. So let's do that.

In my abbreviated version above, I've trimmed out quite a few elements,
but it shouldn't make any difference. The first and only child of descId
above is the table. So starting with Step 2, we get to step 2A whose
rules are above.

The table in question is hidden as defined in the Accname spec. The
table in question is not "directly referenced" by aria-labelledby or
aria-describedby nor by a native host language text alternative element.
As a result, the instructions are "return the empty string." Thus we
would never get down to the cells to even consider if they are hidden or

Am I missing something or are the expectations associated with this test
case invalid unless we change the spec text?

Received on Thursday, 10 May 2018 01:29:55 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 10 May 2018 01:29:56 UTC