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

Text only visible for screenreader is considered "visible" #3624

Closed
plehnen opened this issue Mar 1, 2019 · 1 comment
Closed

Text only visible for screenreader is considered "visible" #3624

plehnen opened this issue Mar 1, 2019 · 1 comment
Labels
topic: visibility 👁 type: duplicate This issue or pull request already exists

Comments

@plehnen
Copy link

plehnen commented Mar 1, 2019

Current behavior:

For a11y reasons some elements have the following css class:

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

Those are not visible in the browser.
Still cypress result true if I check for should('be.visible').

Desired behavior:

I want to be able to use cypress to check if a text is really visible.

Steps to reproduce: (app code and test code)

Add the mentioned css class to any element and check for it's visibility.
It is not visible, but will be found as visible.

Versions

3.1.5, Windows 10, Chrome

@jennifer-shehane
Copy link
Member

I believe this is a duplicate of #1178

@jennifer-shehane jennifer-shehane added type: duplicate This issue or pull request already exists topic: visibility 👁 labels Mar 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: visibility 👁 type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants