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

Some role assertions in webdriver/tests/get_computed_role/get.py seem incorrect #39118

Closed
cookiecrook opened this issue Mar 21, 2023 · 2 comments · Fixed by #39618
Closed

Some role assertions in webdriver/tests/get_computed_role/get.py seem incorrect #39118

cookiecrook opened this issue Mar 21, 2023 · 2 comments · Fixed by #39618
Assignees

Comments

@cookiecrook
Copy link
Contributor

Some role assertions in webdriver/tests/get_computed_role/get.py seem incorrect.

@pytest.mark.parametrize("html,tag,expected", [
    ("<li role=menuitem>foo", "li", "menuitem"),
    ("<input role=searchbox>", "input", "searchbox"),
    ("<img role=presentation>", "img", "presentation")])
  1. menuitem is orphaned, not in a menu, so this test likely asserts a shared browser bug. (WK issue is possibly 130364). Suggestion: ("<main>foo</main>", "main", "main"),
  2. searchbox appears correct.
  3. presentation asserts a synonym of none which is not specified (discussed in Core-AAM 166) and results differ between browsers. This test could change to something less ambiguous like button… Suggestion: ("<img role=button tabindex=0>", "img", "button")])
@cookiecrook
Copy link
Contributor Author

cookiecrook commented Mar 21, 2023

Current results

  1. WebKit and Chrome both erroneously pass.
  2. WebKit and Chrome both pass.
  3. WebKit has correct behavior (according to recent Core-AAM PR) and erroneously fails. Chrome has incorrect behavior and erroneously passes.

Once these proposed changes land, all 3 results should pass in Chrome and WebKit. Gecko recently added support for computedrole, so it may pass soon, too.

@cookiecrook
Copy link
Contributor Author

@spectranaut @jnurthen please confirm my assumptions above before I file a PR. Thanks.

@cookiecrook cookiecrook self-assigned this Mar 21, 2023
cookiecrook added a commit to cookiecrook/wpt that referenced this issue Apr 20, 2023
cookiecrook added a commit that referenced this issue Apr 21, 2023
Resolves #39118

Changes the WebDriver tests for computedrole to avoid some invalid tests. Note: The removed validation test are either already tests in /html-aam or /wai-aria, or are on the list to be written soon, so this should keep the WebDriver tests reliable without churn from unrelated accessibility changes.

Reviewed by juliandescottes and jcsteh.
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

Successfully merging a pull request may close this issue.

1 participant