Code Monkey home page Code Monkey logo

Comments (5)

jdan avatar jdan commented on August 21, 2024

There is no feasible way to check for the gradient programmatically, but the color error should still be valid because it falls under the same category as having an image there.

The way I see it is - if the background image didn't load (or if the gradient wasn't supported in that browser), the user would see the button's background-color. In this case, white, which fails a contrast check. In short, there should be an explicit background color on this button (even if the gradient overrides it) that has viable contrast. Scratch this, we're not reading the background-color if there's a gradient there.

Would be nice to communicate this to the user, though. Perhaps check for background-image and modify the error message to include the info I just wrote above?

from tota11y.

snorrekim avatar snorrekim commented on August 21, 2024

Oh. I forgot to mention. If you look at the css it does have an explicit
fallback background color that is valid. (it's strikes out because chrome
is is using background-image insted). So I guess that might be a bug?

But yeah if you can't check for the gradient colors, at least a check for
background-image with an explanation would be good. The explenations are
one of the great strengths of this project.
On 9 Jun 2015 17:04, "Jordan Scales" [email protected] wrote:

There is no feasible way to check for the gradient programmatically, but
the color error should still be valid because it falls under the same
category as having an image there.

The way I see it is - if the background image didn't load (or if the
gradient wasn't supported in that browser), the user would see the button's
background-color. In this case, white, which fails a contrast check. In
short, there should be an explicit background color on this button (even if
the gradient overrides it) that has viable contrast.

Would be nice to communicate this to the user, though. Perhaps check for
background-image and modify the error message to include the info I just
wrote above?


Reply to this email directly or view it on GitHub
#5 (comment).

from tota11y.

jdan avatar jdan commented on August 21, 2024

Oh, my mistake, you're absolutely right. Checking either end of the gradient is probably the best we can do.

from tota11y.

jdan avatar jdan commented on August 21, 2024

I went ahead and filed the first bit - descriptive error messages for background images - as its own issue in #6.

from tota11y.

jdan avatar jdan commented on August 21, 2024

GoogleChrome/accessibility-developer-tools#79

May need to leave it up to them.

from tota11y.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.