frontend-interview-questions

1. What steps do you take to ensure a React application meets WCAG 2.1 accessibility standards?

To meet WCAG 2.1, I focus on semantic HTML , keyboard support , screen reader compatibility , and color contrast .

Key steps:


2. How do you handle keyboard navigation and focus management in a complex React component like a modal or dropdown?

I ensure:

  1. Focus trap : Keep focus inside the component using libraries like focus-trap-react.
  2. Initial focus : Move focus to the first interactive element on open.
  3. Return focus : Restore focus to the trigger on close.
  4. Keyboard handlers : Support Tab/Shift+Tab, Escape, Arrow keys.


3. Describe a time when you improved the accessibility of a frontend feature. What tools did you use?

At my last role, we had a custom dropdown with mouse-only interaction. I:

Result: WCAG 2.1 AA compliance and improved experience for keyboard and screen reader users.


4. How do you test for accessibility in a React app, and what role do tools like Axe or Lighthouse play?

I use a combination of automated , manual , and assistive tech testing .

Tools:


5. What are some common accessibility mistakes in React applications, and how do you prevent them?

Common issues and solutions: