Skip to content

Commit

Permalink
Use better assertions for computedrole (web-platform-tests#39618)
Browse files Browse the repository at this point in the history
Resolves web-platform-tests#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.
  • Loading branch information
cookiecrook committed Apr 21, 2023
1 parent 283ad5c commit e1beec6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webdriver/tests/get_computed_role/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ def test_stale_element_reference(session, stale_element, as_frame):


@pytest.mark.parametrize("html,tag,expected", [
("<li role=menuitem>foo", "li", "menuitem"),
("<article>foo</article>", "article", "article"),
("<input role=searchbox>", "input", "searchbox"),
("<img role=presentation>", "img", "presentation")])
("<img role=button tabindex=0>", "img", "button")])
def test_computed_roles(session, inline, html, tag, expected):
session.url = inline(html)
element = session.find.css(tag, all=False)
Expand Down

0 comments on commit e1beec6

Please sign in to comment.