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

Investigate adding automated accname tests in wpt/webdriver #174

Closed
jnurthen opened this issue Oct 14, 2022 · 12 comments
Closed

Investigate adding automated accname tests in wpt/webdriver #174

jnurthen opened this issue Oct 14, 2022 · 12 comments
Assignees
Milestone

Comments

@jnurthen
Copy link
Member

all the accname tests should be able to be rewritten to use webdriver.

@MelSumner
Copy link
Contributor

ok! @accdc let's schedule some time to get on the same page about this and come up with an action plan. 👍

@spectranaut spectranaut added this to the 2023H1 milestone Oct 20, 2022
@cookiecrook
Copy link
Contributor

Implemented in Chromium and WebKit.

Gecko tracker: https://bugzilla.mozilla.org/show_bug.cgi?id=1788867

@cookiecrook
Copy link
Contributor

@cookiecrook
Copy link
Contributor

Taking assignment as this is likely to be part of the InterOp 2023 Accessibility Investigation.

@cookiecrook
Copy link
Contributor

cookiecrook commented Feb 17, 2023

FWIW, the Mac configuration steps on the WPT site didn't work for me, so here's my variant of what worked.

Setting up a new Mac system to run WPT tests

  1. In Terminal, make sure you're using the system variant of python3: % which python3 should return /usr/bin/python3
  2. Download and install Safari Technology Preview.
  3. Add the following to ~/.zprofile or wherever you define your shell path.
export PATH="$( xcrun python3 -m site --user-base )/bin:$PATH"
  1. To get the change, open a new shell tab/window, or paste the same line into your current shell.
  2. In Terminal, cd to a directory where you want the WPT source to live, then:
xcrun git clone https://github.com/web-platform-tests/wpt.git
xcrun pip3 install --user virtualenv
cd wpt
sudo /Applications/Safari\ Technology\ Preview.app/Contents/MacOS/safaridriver --enable
./wpt make-hosts-file | sudo tee -a /etc/hosts
  1. In Safari Tech Preview, select Safari > Settings… > Advanced > "Show Develop menu in menu bar" then select Develop > Allow Remote Automation.
  2. Attempt to run a single test from Terminal.
python3 ./wpt run --log-mach-level debug --log-mach - --webdriver-arg="--diagnose" safari /webdriver/tests/get_computed_label/get.py

You should get some percentage of passes and failures. The specific passes/failures should match the results on WPT.fyi for the same test.

Note: Watch out for double hyphens in CLI params. Depending on the text field you copy out of, autocorrect may convert them to en dashes (–) which can look identical in monospace.

@cookiecrook
Copy link
Contributor

testdriver extension PR here: https://github.com/web-platform-tests/wpt/pull/38758/files

@cookiecrook
Copy link
Contributor

Once that lands, you should be able to do:

python3 ./wpt run --log-mach-level debug --log-mach - --webdriver-arg="--diagnose" safari /accname/basic.html
python3 ./wpt run --log-mach-level debug --log-mach - --webdriver-arg="--diagnose" safari /aria/role/basic.html

@cookiecrook
Copy link
Contributor

It should work in Chromium, too. Gecko has the prerequisite webdriver support planned for the April/May timeframe.

@cookiecrook
Copy link
Contributor

Firefox patch here: https://bugzilla.mozilla.org/show_bug.cgi?id=1585622#c21 🎉

@cookiecrook
Copy link
Contributor

Work continues in the following:

Should we close this AccName #174 issue as completed?

@cookiecrook
Copy link
Contributor

I think this is done now... There are currently 382 AccName tests among the other WPT Accessibility tests. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants