Skip to content

Commit

Permalink
[Interop] Add TestDriver support for get_computed_label and get_compu…
Browse files Browse the repository at this point in the history
…ted_role

Implement the TestDriver APIs get_computed_label and get_computed_role
as specified at [1] and [2].

These are needed for the accname tests in the Interop2024 Accessibility
focus area [3].

These APIs were added to WPT in [4] and are already supported in
WebDriver. Implementing them on window.internals allows us to run
these tests in the normal Chromium test environment, which will help
us in getting the tests passing for Interop2024.

[1] https://w3c.github.io/webdriver/#get-computed-label
[2] https://w3c.github.io/webdriver/#get-computed-role
[3] https://wpt.fyi/results/accname?label=master&label=experimental&aligned&view=interop&q=label%3Ainterop-2024-accessibility
[4] 790bb1a

Bug: 325612090, 41490722
Change-Id: I4d6899a97f1ed26a26b4e3b2e07ef2eb9e6e4b96
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5328611
Reviewed-by: Alison Maher <almaher@microsoft.com>
Commit-Queue: Dan Clark <daniec@microsoft.com>
Cr-Commit-Position: refs/heads/main@{#1272377}
  • Loading branch information
dandclark authored and chromium-wpt-export-bot committed Mar 13, 2024
1 parent 1a5ad29 commit 2a5fc85
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions accname/name/comp_label.html
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,12 @@ <h2>Name computation precedence tests</h2>
x
</button>

<span style="display: none">
<button data-expectedlabel="" data-testname="Hidden button's label should be the empty string" class="ex">
x
</button>
</span>

<!-- Step 2B: LabelledBy supercedes 2D: AriaLabel, also see wpt/accname/name/comp_labelledby.html -->
<a href="#" aria-labelledby="span6" aria-label="foo" data-expectedlabel="label" data-testname="link's aria-labelledby name supercedes aria-label" class="ex">x</a>
<span id="span6">label</span>
Expand Down

1 comment on commit 2a5fc85

@cookiecrook
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.