Skip to content

Instantly share code, notes, and snippets.

@matthiasbaldi
Last active August 24, 2021 14:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save matthiasbaldi/89cf3449293336c1b7ee4ea2f9c191b0 to your computer and use it in GitHub Desktop.
Save matthiasbaldi/89cf3449293336c1b7ee4ea2f9c191b0 to your computer and use it in GitHub Desktop.
Tips & Tricks -> Just Remind it.

Angular

  • Wrapper for format and number pipes, for better maintainability
  • Use projections instead of working with *ngIf in template or with methods

Accessibility

  • Use a screenrreader as validation and in the development process
  • Good accessibility is also positiv for a good HTML dom and SEO
  • Respect contrast and visualize focus
  • Use aria-label i.e. to describe buttons, icon buttons, links, radios etc., sometimes a title is not enough
  • Use ul/li list elements for navigations, then the screenreader reads the number of choices
  • Use icon SVG with alt or title text attributes
  • Use filedset legend if you have titles in forms etc to be read during navigation through the form, otherwise use labels for the input elements
  • Do not fade out warnings or errors to fast (better no fading out, make it dismissable) to allow slower people to read it
  • If you have graphs may set a aria-hidden attribute and explain what they would see in a visually: hidden text somewhere.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment