You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We've made great improvements to the a11y of our object tree for use within our e2e tests. For example, we can now use compounding locators such as the following in order to dynamically expand tree items:
consttreePane=page.locator('#tree-pane');constcollapsedTreeItems=treePane.locator('role=treeitem[expanded=false]');// Expand the first collapsed tree itemawaitcollapsedTreeItems.first().locator('.c-disclosure-triangle').click();
However, .c-disclosure-triangle (the actual element we click to expand the tree item) doesn't currently have any visibility css property attached to it, so Playwright locators will pick up expand triangles for unexpandable tree items (such as Clocks) since they are technically invisible to the end user, but not to Playwright's locators.
A fix for this would be to add visibility: hidden or visibility: visible to the .c-disclosure-triangle class depending on whether or not it .is-enabled (another class we already append to expandable tree items).
The text was updated successfully, but these errors were encountered:
Summary
We've made great improvements to the a11y of our object tree for use within our e2e tests. For example, we can now use compounding locators such as the following in order to dynamically expand tree items:
However,
.c-disclosure-triangle
(the actual element we click to expand the tree item) doesn't currently have anyvisibility
css property attached to it, so Playwright locators will pick up expand triangles for unexpandable tree items (such as Clocks) since they are technically invisible to the end user, but not to Playwright's locators.A fix for this would be to add
visibility: hidden
orvisibility: visible
to the.c-disclosure-triangle
class depending on whether or not it.is-enabled
(another class we already append to expandable tree items).The text was updated successfully, but these errors were encountered: