Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35545
| From | Cezary Tomczyk <cezary.tomczyk@gmail.com> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: Finding a real background color of an element |
| Date | 2018-08-24 19:09 +0200 |
| Organization | csiph.com Internet News Service |
| Message-ID | <plpe4k$smh$1@csiph.com> (permalink) |
| References | (1 earlier) <1ubqz126avwqd$.1ba1f0ac07trn$.dlg@40tude.net> <plk4ts$45p$1@csiph.com> <f1ec33cc-cc3d-4ad7-b25f-23f6796df02d@googlegroups.com> <plli2g$11k5$1@csiph.com> <c184b350-2682-46b7-922c-812765134d54@googlegroups.com> |
On 23/08/2018 13:54, Julio Di Egidio wrote: > On Thursday, 23 August 2018 07:52:23 UTC+2, Cezary Tomczyk wrote: >> On 22/08/2018 20:37, Julio Di Egidio wrote: >>> On Wednesday, 22 August 2018 19:01:56 UTC+2, Cezary Tomczyk wrote: >>> >>>> That means to me that there is no reliable way to get a real background >>>> color of the HTML element. :/ >>> >>> Well, if you have control over it, do set a color and background color on >>> the body, that's required for accessibility anyway. When there is no such >>> information and one needs it, rather review your approach and expectations. >> >> The background and foreground color should be defined for the body, but >> mostly is not defined. In reality, I mean. > > Sometimes accessibility really doesn't matter (but then one would not lint for > accessibility anyway). In all other cases, I'd say no competent web programmer > can make that mistake: in our toolbox there is a minimal style just as there is > a minimal html... Yes, I share these thoughts "minimal style just as there is a minimal html...". >>> What is it that you are trying to build? Theming? A self-styling widget? >>> Otherwise what? There are solutions to every well-posed problem, as well as >>> there are ill-posed problems or solutions for no problem at all... >> >> I do calculate a contrast ratio and for that purpose I need background >> and foreground color. Currently, if I can't determine a background color >> for a particular element then I do skip contrast ratio calculation. > > I'd expect an accessibility linter to rather report it as a most basic and > most serious violation. Unfortunately none of known to me are reporting it. >> I am working on https://www.aslint.org/. The code is not public yet, but >> I have a plan to publish it. > > Not an easy one: accessibility requirements for a significant part rely on > subjective evaluation. So, it will be interesting to see what you come up > with... :) I think I'll include that case in the report to draw the attention. I think developers should be aware that if background can not be explicitly determined then they should fix it. :-) -- Cezary Tomczyk http://www.ctomczyk.pl/
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-08-21 19:40 +0200
Re: Finding a real background color of an element "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-08-21 21:14 -0700
Re: Finding a real background color of an element JJ <jj4public@vfemail.net> - 2018-08-22 14:32 +0700
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-08-22 19:01 +0200
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-08-22 11:37 -0700
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-08-23 07:52 +0200
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-08-23 04:54 -0700
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-08-24 19:09 +0200
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-03 03:55 -0700
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-03 04:28 -0700
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-03 05:09 -0700
Re: Finding a real background color of an element "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2018-09-02 12:40 -0700
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-03 03:51 -0700
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-03 03:55 -0700
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-09-04 18:52 +0200
Re: Finding a real background color of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-08-29 22:12 +0200
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-08-31 22:30 +0200
Re: Finding a real background color of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-02 05:09 +0200
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-09-02 19:57 +0200
Re: Finding a real background color of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-03 15:09 +0200
Re: Finding a real background color of an element Cezary Tomczyk <cezary.tomczyk@gmail.com> - 2018-09-04 19:02 +0200
Re: Finding a real background color of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-04 22:15 +0200
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-04 22:48 -0700
Re: Finding a real background color of an element Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2018-09-08 15:39 +0200
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-08 06:57 -0700
Re: Finding a real background color of an element Richard Damon <Richard@Damon-Family.org> - 2018-09-08 13:32 -0400
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-08 10:43 -0700
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-08 10:44 -0700
Re: Finding a real background color of an element Richard Damon <Richard@Damon-Family.org> - 2018-09-08 14:23 -0400
Re: Finding a real background color of an element Julio Di Egidio <julio@diegidio.name> - 2018-09-08 11:31 -0700
Re: Finding a real background color of an element Richard Damon <Richard@Damon-Family.org> - 2018-09-08 17:59 -0400
Re: Finding a real background color of an element Silvio <silvio@internet.com> - 2018-09-04 22:05 +0200
csiph-web