Archive index

A11y Slackers Gitter Channel Archive 6th of January 2016

What fresh hell is THIS now? - Patrick Lauke
  1. jkva
    12:40
    Is there a tried-and-true way to represent a range score (say, "3 out of 5 stars") that I could style with CSS but could also make accessible?
  2. jkva
    12:41
    I mean, I could use ARIA to describe it, but if there's a native way to achieve it, I'd prefer that.
  3. MichielBijl
    12:55
    You could do something like: <img src="3-of-5.png" alt="3 out of 5 stars">
  4. MichielBijl
    12:56
    Or use background images (with masking) to achieve the same thing: <p><span>3 out of 5 stars</span></p>
  5. MichielBijl
    12:56
    That last one is incorrect, hang on.
  6. MichielBijl
    12:57
    Meh, you can actually do it with that HTML.
  7. MichielBijl
    12:57
    Let me write some CSS.
  8. MichielBijl
    12:59
    Wait, you cannot =P
  9. MichielBijl
    12:59
    I'll just write the whole darn thing…
  10. jkva
    12:59
    @MichielBijl I appreciate the help :)
  11. MichielBijl
    13:04

    Say this is your HTML, this would render just fine without CSS (so it's aggressively enhanced!):

    <p class="rating">     <span>         <span>3 out of 5 stars</span>     </span> </p>
    

    Stuff this CSS in there and call it a day:

    p.rating {     position: relative;     width: 100px;     height: 30px;     /* This would contains like your typical grey stars */     background-image: url(star-base.png); }  /* Set the width on render time, or via JavaScript.     E.g. 'width: 50%;' would give you 2.5 stars, 60% 3 stars, etc. */ p.rating > span {     position: absolute;     top: 0;     left: 0;     height: 100%;     /* These are your coloured in stars */     background-image: url(star-filled.png); }  /* This contains the text. Let's visually hide these */ p.rating span > span {     position: absolute;     clip: rect(0, 0, 0, 0);     width: 1px;     height: 1px;     overflow: hidden; }
    
  12. MichielBijl
    13:05
    And use SVG background if possible for extra fancyness.
  13. jkva
    13:05
    Wow, very nice. @MichielBijl ++
  14. MichielBijl
    13:05
    No problem =)
  15. MichielBijl
    13:07
    If you need an input thing, you can look at this thing: http://codepen.io/Michiel/pen/674c646424cfdf7b01beabee461b19b7
  16. MichielBijl
    13:07
    That is not tested nearly enough though.
  17. jkva
    13:07
    Ah no, it's readonly.
  18. jkva
    13:09
    @MichielBijl Theoretically I could also use an alt tag + title, yes?
  19. MichielBijl
    13:10
    If you run into any issues with that p based solution, just give a shout.
  20. MichielBijl
    13:10
    Uhm, like so: <img src="3-of-5.png" alt="3 out of 5 stars" title="3 out of 5 starts">?
  21. jkva
    13:12
    @MichielBijl: Yes. Because this score is a color indicator (color "intensity") :-/
  22. MichielBijl
    13:13
    That should work fine, you just need more images =P
  23. jkva
    13:13
    So having a color image, plus alt for AT and title for "What does this represent" should be ok
  24. MichielBijl
    13:14
    I don't see why it wouldn't. Except if the image fails to load…
  25. MichielBijl
    13:14
    alt text should be displayed, but I'm unsure where it doesn't.
  26. MichielBijl
    13:14
    Although you'd have the same issue with the p based thing.
  27. jkva
    13:15
    Just checking :)
  28. jkva
    13:15
    Boy, this default smiley is awfully enthusiastic
  29. MichielBijl
    13:16
    It is, @garcialo suggested we use =)
  30. MichielBijl
    13:16
    And I've opened an issue against Gitter here: gitterHQ/gitter#949
  31. jkva
    13:18
    Nice
  32. MichielBijl
    14:27
    Does anyone have test results for caret navigation in pseudo elements? This seems like a cool thing to do (in certain cases): https://gist.github.com/cameronhunter/3818664
  33. MichielBijl
    14:29
    Say you have field called “House number” that doesn't fit on small screens. Use an abbreviation to set it up like “House num.” or whatever the correct abbreviation is.
  34. garcialo
    15:03
    I don't think I've ever suggested we use =)
  35. garcialo
    15:04
    I just use that personally and always forget it doesn't translate well to emoticonity
  36. MichielBijl
    15:05
    Can't we count continued use as a suggestion anymore =P
  37. garcialo
    15:06
    You can if you'd like.
  38. jonathantneal
    16:18
    If you haven’t been keeping up. Microsoft is ending support for Internet Explorer 8-10 all at once. https://twitter.com/jon_neal/status/684770960705073152
  39. MichielBijl
    16:24
    Good news, I'm interested to see how this will influence usage.
  40. yatil @yatil has finally gotten around to set this up in IRC so he doesn’t miss all the great discussions. waves
  41. garcialo
    17:13
    Welcome @yatil Great to have you =)
  42. jkva @jkva waves
  43. MichielBijl @MichielBijl waves at @yatil
  44. jkva
    18:14
    I've gone through @heydon's Apps for All and Aaron Gustafson's Adaptive Web Design. Are there any such books on good web development that I should add to that list?
  45. jkva
    18:15
    Tiffany B Brown's "CSS Master" is also on my current list, it seems good
  46. MichielBijl
    18:19
    I've ordered Adaptive Web Design, but it hasn't come in yet
  47. jkva
    18:33
    @MichielBijl I think you'll like it, it's written in an inspirational manner
  48. MichielBijl
    18:48
    I really liked the excerpt on ALA
  49. zakim-robot
    19:29
    [techthomas] @marcysutton: E-Commerce platform followup. Other platforms than Shopify mentioned were Magento, Woo Commerce, BigCommerce, and CartThrob. Unfortunately my contacts were unaware of accessibility of these platforms.
  50. zakim-robot
    19:44
    [karlgroves] AFAIK Woo Commerce is built on a WP platform. I can check with the WP Accessibility folks to see if any of them have any experience. I asked about it at one time and I think that people were saying you had the same level of control in term of theme design as you do with WP. The challenge, of course, is that the existing theme landscape includes a bunch of inaccessible crap
  51. MichielBijl
    19:52
    @karlgroves @techthomas guess it depends on whether you judge it on its base theme or all the crap out there?
  52. zakim-robot
    19:55
    [monsika] Shopify-er here - would love to hear feedback if anyone’s taken a recent look at a11y of either our admin product or our hosted-themes. We’r working on it and definitely want to get better