Wednesday, May 3, 2017

Tips for making your web site WCAG compliant

These are some of the tips for making sure that our site is WCAG compliant

  • Label  all form elements
  • Provide alternate text for non-text content. This would help people who are blind with assistance technology which can announce to them.People who are blind can use screen readers like 
    • VoiceOver is inbuilt in mac
    • NVDA and JAWS has to be downloaded for windows
    • Chrome browser has chromevox
  • We need to make sure that color contrast meets minimum thresholds. There are guidelines for threshold
  • Add dots to end of important color message
  • Add captions to audio content
  • Based on the guidelines we need to make sure that we have the ratio for the contrast for all the colors in our website
  • Use aria guidelines as mentioned in the link http://www.prathapkudupublog.com/2017/05/overview-of-wcag.html

        

Overview of WCAG



WCAG is a series of web accessibility guidelines published  by W3C.

There are 3 levels of WCAG 2.0 specifications.

1. WCAG Single Level A,
2. WCAG Double Level A.
3. WCAG Triple Level A

Four important features of Angular 1


Tuesday, May 2, 2017

Tricky double problem


In one of the interview I was asked how to eliminate tricky double in an array.I have not heard about tricky double.

Tricky double means
" 1, 2, 8, 9, 1, 2 , 3, 2 " . In this example what we notice is that 1, 2 is a  tricky double. However 2 is repeated twice it is not a tricky double.

JavaScript pass by reference and pass by value




Pass by value

When we change the value in the inner scope a copy of the value is created, This is known as pass by value.

Promises in JavaScript


Promises

Promises in JavaScript are like promises in real life
  • A promise can only succeed or fail once
  • It cannot succeed or fail twice, neither can it switch from success to failure or vice versa
  • If a promise has succeeded or failed, we later add a success/failure callback. The correct callback will be called, even though the event took place earlier

Closures in JavaScript


A closure is an inner function that has access to the outer (enclosing) function’s variables—scope chain. The closure has three scope chains: it has access to its own scope (variables defined between its curly brackets), it has access to the outer function’s variables, and it has access to the global variables.