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

Update /accname/name/comp_tooltip.html #42093

Merged
merged 4 commits into from
Oct 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 31 additions & 3 deletions accname/name/comp_tooltip.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,39 @@
</head>
<body>

<p>Tests the <a href="https://w3c.github.io/accname/#comp_tooltip">#comp_tooltip</a> portions of the AccName <em>Name Computation</em> algorithm.</p>
<p>Tests the <a href="https://w3c.github.io/accname/#comp_tooltip">#comp_tooltip</a> portions of the AccName <em>Name Computation</em> algorithm.</p>

<a href="#" title="label" data-expectedlabel="label" data-testname="link label from tooltip" class="ex"><img src="#" alt=""></a>
<a href="#" title="label" data-expectedlabel="label" data-testname="link with img with tooltip label" class="ex"><img src="#" alt=""></a>
<a href="#" title="label" data-expectedlabel="label" data-testname="link with text with tooltip label" class="ex">content</a>
<div title="label" role="group" data-expectedlabel="label" data-testname="div with text with tooltip label" class="ex">content</div>
<img src="foo.jpg" title="label" data-expectedlabel="label" data-testname="img with tooltip label without alt" class="ex">
<img src="foo.jpg" title="label" data-expectedlabel="label" alt="" data-testname="img with tooltip label with empty alt" class="ex">
<img src="foo.jpg" title="label" data-expectedlabel="broken" alt="broken" data-testname="img with tooltip label with alt" class="ex">
<img src="foo.jpg" data-expectedlabel="broken" alt="broken" data-testname="img with tooltip label without title" class="ex">

<!-- Todo: test all remaining cases of https://w3c.github.io/accname/#comp_tooltip -->
<textarea title="enter text" data-expectedlabel="enter text" placeholder="textarea" data-testname="textarea with placeholder and tooltip label" class="ex"></textarea>
<input type="text" title="label" data-expectedlabel="label" placeholder="text" data-testname="text input with placeholder and tooltip label" class="ex">
<input type="email" title="label" data-expectedlabel="label" placeholder="email" data-testname="email input with placeholder and tooltip label" class="ex">
<input type="password" title="label" data-expectedlabel="label" placeholder="password" data-testname="password input with placeholder and tooltip label" class="ex">
<input type="checkbox" title="label" data-expectedlabel="label" data-testname="checkbox input with tooltip label" class="ex">
<input type="radio" title="label" data-expectedlabel="label" data-testname="radio input with tooltip label" class="ex">
<button title="label" data-expectedlabel="label" data-testname="button with tooltip label" class="ex">button</button>
<abbr title="Web Platform Tests" data-expectedlabel="Web Platform Tests" data-testname="abbr with tooltip label" class="ex">WPT</abbr>
<kbd title="Control + Option" data-expectedlabel="Control + Option" data-testname="kbd with tooltip label" class="ex">CTRL + OPT</kbd>

<select title="label" data-expectedlabel="label" data-testname="select with tooltip label" class="ex">
<option value="" disabled selected>select options</option>
<option value="1">option 1</option>
<option value="2">option 2</option>
<option value="3">option 3</option>
</select>

<details>
<summary title="label" data-expectedlabel="label" data-testname="summary with tooltip label" class="ex">summary</summary>
details
</details>

<iframe title="label" data-expectedlabel="label" data-testname="iframe with tooltip label" width="20px" height="20px" class="ex"></iframe>

<script>
AriaUtils.verifyLabelsBySelector(".ex");
Expand Down