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
One of the big challenges in automated accessibility testing is to test for color contrast. And one of the biggest challenges in testing for color contrast is to figure out what is going on with pseudo elements on the page. It would be very helpful if, similar to window.getComputedStyle the Element.getClientRects and Element.getBoundingClientRect methods could accept an argument which tells the browser to return rect(s) of the pseudo element instead. This could look something like:
constpseudoRects=elm.getClientRects(':after');
This would help tools like axe-core, and other accessibility tools, which currently just sort of have to guess what's going on with the pseudo elements based on computed styles.
The text was updated successfully, but these errors were encountered:
There's a few other operations that would probably make sense for pseudo-elements as well. We had an older proposal for a PseudoElement object that you could retrieve with code like elm.pseudo("::before"), which would just expose a few methods like scrollTo() and getBoundingClientRect().
One of the big challenges in automated accessibility testing is to test for color contrast. And one of the biggest challenges in testing for color contrast is to figure out what is going on with pseudo elements on the page. It would be very helpful if, similar to
window.getComputedStyle
theElement.getClientRects
andElement.getBoundingClientRect
methods could accept an argument which tells the browser to return rect(s) of the pseudo element instead. This could look something like:This would help tools like axe-core, and other accessibility tools, which currently just sort of have to guess what's going on with the pseudo elements based on computed styles.
The text was updated successfully, but these errors were encountered: