Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AccName] Label computation for elements with computed role of none #171

Open
giacomo-petri opened this issue Jan 31, 2025 · 0 comments
Open
Labels
blocked by testability desirable, but not testable yet

Comments

@giacomo-petri
Copy link

giacomo-petri commented Jan 31, 2025

Ref: web-platform-tests/wpt#50002 (review)

I've removed from the PR all elements with an explicit or computed role of "none," as there's no reliable way to obtain a label from an ignored element.

I've also kept track of the created examples, so they're available if needed in the future.

<!-- This test case is specifically designed to check the accessible name, but a separate test case has been created in wai-aria/role/role_none_conflict_resolution.tentative.html to check the role -->
<h2>HTML input with role="none" and disabled with label associated</h2>
<h3>HTML input label/for</h3>
<label for="irpd">input label</label>
<input id="irpd" type="text" data-expectedlabel="" data-testname="html: label[for]+input[role=none][disabled] (role none applied due to disabled input)" class="ex-label" role="none" disabled>
<h3>HTML label encapsulation</h3>
<label>
      <span>input label</span>
      <input type="text" data-expectedlabel="" data-testname="html: label>input[role=none][disabled] (with label encapsulation, role none applied due to disabled input)" class="ex-label" role="none" disabled>
</label>
<h2>HTML img with role="none" and non empty alt</h2>
<img src="https://www.w3.org/assets/logos/w3c/w3c-no-bars.svg" role="none" alt="w3c logo" data-expectedlabel="" data-testname="html: img[role=none][alt]:not([alt='']) (role none takes precedence over empty alt)" class="ex-label">
<h2>HTML fieldset with role="none" wrapping legend</h2>
<fieldset role="none" data-expectedlabel="" data-testname="html: fieldset[role=none]>legend (role none set on fieldset affects fieldset acc name)" class="ex-label"><legend>legend</legend></fieldset>
<h2>HTML fieldset role="none" wrapping legend with role="none"</h2>
<fieldset role="none" data-expectedlabel="" data-testname="html: fieldset[role=none]>legend[role=none] (role none set on fieldset affects fieldset acc name)" class="ex-label"><legend role="none">legend</legend></fieldset>
<h2>HTML table with role="none" wrapping caption</h2>
<table role="none" data-expectedlabel="" data-testname="html: table[role=none]>caption (role none set on table affects fieldset acc name)" class="ex-label">
   <caption>caption</caption>
   <tr>
      <th>th1</th>
      <th>th2</th>
   </tr>
   <tr>
      <td>td1</td>
      <td>td2</td>
   </tr>
</table>
<h2>HTML table role="none" wrapping caption with role="none"</h2>
<table role="none" data-expectedlabel="" data-testname="html: table[role=none]>caption[role=none] (role none set on table affects fieldset acc name)" class="ex-label">
   <caption role="none">caption</caption>
   <tr>
      <th>th1</th>
      <th>th2</th>
   </tr>
   <tr>
      <td>td1</td>
      <td>td2</td>
   </tr>
</table>
@cookiecrook cookiecrook added the blocked by testability desirable, but not testable yet label Feb 3, 2025
@cookiecrook cookiecrook changed the title [Blocked by testability] Elements with computed role of none - Acc name [AccName] Label computation for elements with computed role of none Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked by testability desirable, but not testable yet
Projects
None yet
Development

No branches or pull requests

2 participants