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

I'm okay either way, but let me know what the consensus is and I'll make the executable code changes.

Also, I need to be in Denver all next week, so I likely won't be available at that time.

Bryan Garaventa
Accessibility Fellow
Level Access, Inc.
Bryan.Garaventa@LevelAccess.com
415.624.2709 (o)
www.LevelAccess.com

-----Original Message-----
From: Joanmarie Diggs <jdiggs@igalia.com> 
Sent: Wednesday, May 09, 2018 6:29 PM
To: ARIA Working Group <public-aria@w3.org>
Subject: Sanity checking a test case with description from non-rendered contents

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:
https://www.w3.org/wiki/AccName_1.1_Testable_Statements#Description_from_content_of_describedby_element_which_is_hidden


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

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 not.

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

--joanie

Received on Thursday, 10 May 2018 16:59:11 UTC