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

SIA-R66 and SIA-R69 fail to account for background images not used as background images #748

Closed
1 task done
kasperisager opened this issue Mar 16, 2021 · 3 comments · Fixed by #771
Closed
1 task done
Assignees
Labels
bug Report of unexpected or faulty behaviour in Alfa

Comments

@kasperisager
Copy link
Contributor

kasperisager commented Mar 16, 2021

Confused? So was I 🙈 This bit of HTML and CSS currently fails both rules due to seemingly poor contrast:

<style>
  h1 {
    color: #333;
    background-image: linear-gradient(
      to right,
      rgb(0, 0, 0) 0%,
      rgb(0, 0, 0) 100%
    );
    background-repeat: repeat-x;
    background-position: 0px 100%;
    background-size: 100% 2px;
  }
</style>

<h1>Hello world</h1>

This is what it renders:

Rendered output

Yep, that's a background image being used to create a border. Because, why not? 🤷 We need to deal with that.

@kasperisager kasperisager added the bug Report of unexpected or faulty behaviour in Alfa label Mar 16, 2021
@kasperisager
Copy link
Contributor Author

We'll return None from getBackground() if we encounter a background-size.

@Jym77
Copy link
Contributor

Jym77 commented May 4, 2021

Depends on #784.

@Jym77 Jym77 mentioned this issue May 4, 2021
@Jym77 Jym77 self-assigned this May 6, 2021
@offsetChris
Copy link

Hello, Just saw this linked in an issue and thought I would also throw in the situation of using pseudo elements as the graphical indicator. I've seen this in the past and wondering how it would behave for this check. I can make this a separate issue too if needed since it doesn't relate exactly to the issue subject.

h1:after{
 content:"";
 height:2px;
 width:100%;
 background-color:#000;
 display:inline-block;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Report of unexpected or faulty behaviour in Alfa
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants