Skip to main content

Posts

Showing posts from December, 2020

Navigating WCAG 2.1: A Step-by-Step Approach for Developers

 Get Familiar with WCAG 2.1: WCAG 2.1 is like the rulebook for web accessibility. It's split into four parts: Perceivable, Operable, Understandable, and Robust (POUR). For instance, "Perceivable" includes rules like giving all images a text description (alt text) for folks who can't see them.  Run an Accessibility Audit: Use tools like Google Lighthouse or WAVE to scan your site. They'll flag up stuff like missing alt text, low color contrast, or form fields without labels.  Manual Testing: Automated tools can't catch everything. You'll need up roll to your sleeves and do some manual testing. Try navigating your site using only your keyboard, or using a screen reader like NVDA or VoiceOver. You're checking that all content and functionality is accessible.   Write an Accessibility Statement: This is a page on your site where you talk about your commitment to accessibility. You could mention that you're aiming for WCAG 2.1 Level AA compliance, lis

Regular Expressions cheat sheet

Cheat Sheet Character Meaning Example ^ the beginning of the string $ the end of the string \b whole word only \babc\b matches 'abc', but not 'abcc ' \B if the pattern is fully surrounded by word \Babc\B mathes 'aabcc', but not 'abc' . anything \d single digit in 0-9 \D single non-digit \w single word character \W single non-word \s white space(space, tab, return, new line) \S non-whitespace \t tab \r return \n new line \g global search, which means it doesn't stop at the first match * zero or more of the previous abc* matches a string that has ab followed by zero or more c + one or more of the previous abc+ matches a string that has ab followed by one or more c ? zero or one of the previous abc? matches a string that has ab followed by zero or one c ?: non-capturing group X{m} number of X === m X{m,} m < number of X X{m, n} m < number of X < n (X | Y) X or Y [...] any of characters in the class [abcd] matches a string that has one of the ch