Skip Main Navigation
Ben IlegboduBen Ilegbodu

Accessibility-driven styling

Thursday, December 17, 2020 ยท 0 min read

  • Previous post about design systems talked about wanting to maintain consistency
    • One way is through a style system if UI tech isn't the same
    • At SFIX we've got Rails & React
  • Style system is SASS mixins (clever!)
    • Downside of style systems (like Bootstrap & Foundation) is that the HTML (and JS is left to dev)
    • Additional downside w/ mixins is that they work best w/ single element
  • Example: text field
    • the input, a label and a (error) message
    • we had to put the label after for the mixin to work
  • How do you handle states?
    • Hover and focus states are easy because of pseudo classes
    • What about an error state?
    • Would be easy in React, just add a class when that state happens
    • But what about mixins?
    • Use ARIA attribute for the styling, which enforces devs to have proper accessibility to get visual effects

Keep learning my friends. ๐Ÿค“

Subscribe to the Newsletter

Get notified about new blog posts, minishops & other goodies

โ€‹
โ€‹

Hi, I'm Ben Ilegbodu. ๐Ÿ‘‹๐Ÿพ

I'm a Christian, husband, and father of 3, with 15+ years of professional experience developing user interfaces for the Web. I'm a Google Developer Expert Frontend Architect at Stitch Fix, and frontend development teacher. I love helping developers level up their frontend skills.

Discuss on Twitter // Edit on GitHub