Skip to content

Responsive UI: Responsiveness, Accessibility, Maintainability & Browser Compatibility

Your team needs to build a responsive UI that works consistently across desktop, tablet, and mobile devices.

How would you ensure:

  • Responsiveness
  • Accessibility
  • Maintainability
  • Browser compatibility

For a React-based enterprise application, I would approach responsive UI as a combination of responsive design, accessibility standards, reusable components, and cross-browser testing.

I would use a mobile-first responsive design with CSS Grid, Flexbox, relative units, and standardized breakpoints. For accessibility, I would follow WCAG guidelines, use semantic HTML, keyboard navigation, proper labels, focus management, and screen-reader support.

For maintainability, I would build reusable React components around a common design system, enforce coding standards with ESLint and Prettier, and keep business logic separated from presentation.

For browser compatibility, I would define supported browsers using Browserslist, use appropriate transpilation/polyfills, and validate the application through automated and cross-browser testing using tools such as Playwright or BrowserStack.


The goal is to ensure that the UI adapts naturally to different screen sizes and input devices.

  • Follow a mobile-first approach using CSS media queries.
  • Use Flexbox and CSS Grid instead of fixed-position layouts.
  • Prefer relative units such as:
    • %
    • rem
    • em
    • vw
    • vh
  • Define standard breakpoints for:
    • Mobile
    • Tablet
    • Desktop
    • Large desktop, if required
  • Make images and media responsive using max-width: 100%.
  • Use responsive typography and spacing.
  • Avoid unnecessary hard-coded widths and heights.
  • Build reusable React components that adapt to the available space instead of maintaining separate desktop and mobile implementations.
.container {
width: 100%;
padding: 1rem;
}
@media (min-width: 768px) {
.container {
max-width: 1200px;
margin: auto;
}
}
flowchart TD
    A[User Device] --> B{Viewport Size}
    B -->|Mobile| C[Mobile Layout]
    B -->|Tablet| D[Tablet Layout]
    B -->|Desktop| E[Desktop Layout]

    C --> F[Reusable React Components]
    D --> F
    E --> F

    F --> G[Responsive CSS]
    G --> H[Consistent UI]

I would avoid creating completely different implementations such as:

DesktopComponent
MobileComponent
TabletComponent

unless the interaction itself is fundamentally different.

Instead, I would prefer:

Reusable React Component
|
+-- Responsive CSS
|
+-- Responsive Layout
|
+-- Responsive Interaction

I would follow WCAG guidelines and make accessibility part of development rather than treating it as a final testing activity.

Use meaningful HTML elements:

<header>
<nav>
<main>
<section>
<article>
<button>
<form>
<footer>

Instead of creating everything using generic <div> elements.

Every form field should have an accessible label.

<label htmlFor="email">Email</label>
<input
id="email"
type="email"
/>

This is better than relying only on:

<input placeholder="Email" />

Users should be able to use the application without a mouse.

Important areas include:

  • Buttons
  • Links
  • Forms
  • Dropdowns
  • Modals
  • Menus
  • Tabs
  • Tables
  • Pagination

Focus should remain visible and should be managed correctly when opening and closing components such as dialogs.

For example:

Open Modal
Move focus into Modal
User interacts using keyboard
Close Modal
Return focus to triggering element

Use semantic HTML first.

Use ARIA attributes when native HTML semantics are not sufficient.

Examples include:

aria-label
aria-labelledby
aria-describedby
aria-expanded
aria-live
aria-hidden

Check:

  • Color contrast
  • Font readability
  • Focus indicators
  • Error messages
  • Non-color indicators
  • Responsive text scaling

I would include:

  • Keyboard-only testing
  • Screen-reader testing
  • Automated accessibility testing
  • Lighthouse
  • axe
  • React Testing Library accessibility assertions where appropriate

For maintainability, I would establish a reusable component architecture rather than allowing every feature team to build UI independently.

src/
├── components/
│ ├── Button/
│ ├── Modal/
│ ├── Table/
│ └── Form/
├── pages/
├── hooks/
├── services/
├── styles/
├── utils/
└── types/

Common components should be standardized.

Examples:

Button
Input
Select
Modal
Dropdown
Table
Pagination
Card
Toast
DatePicker
LoadingSpinner

Instead of having multiple slightly different implementations:

UserButton
AdminButton
ProductButton
PaymentButton

when the underlying behavior and visual design are the same.


I would establish common design tokens for:

  • Colors
  • Typography
  • Spacing
  • Border radius
  • Shadows
  • Breakpoints
  • Z-index levels
  • Component states

For example:

:root {
--spacing-sm: 0.5rem;
--spacing-md: 1rem;
--spacing-lg: 1.5rem;
--radius-sm: 4px;
--radius-md: 8px;
--breakpoint-tablet: 768px;
--breakpoint-desktop: 1024px;
}

This reduces duplicated styling and makes global design changes easier.


I would keep UI, business logic, and API communication separated.

flowchart LR
    A[React Page] --> B[Presentation Components]
    B --> C[Custom Hooks]
    C --> D[Service Layer]
    D --> E[REST API]
    E --> F[Backend Services]

    B --> G[Design System]
    C --> H[Reusable Utilities]

For example:

Component
|
+-- Displays UI
|
+-- Receives props
|
+-- Handles UI events
|
v
Custom Hook
|
v
Service Layer
|
v
REST API

This makes components easier to test and reuse.


I would establish common engineering standards across the team.

  • ESLint
  • Prettier
  • TypeScript
  • Husky/pre-commit hooks where appropriate
  • Unit/component tests
  • Code review
  • CI/CD quality gates
  • Avoid duplicated code.
  • Keep components focused.
  • Use meaningful names.
  • Avoid unnecessary abstractions.
  • Keep business logic outside presentation components.
  • Prefer composition over deeply nested component inheritance patterns.
  • Document reusable components.
  • Use Storybook where a component library needs independent development and documentation.

Before development, I would define a supported browser matrix.

For example:

Browser Support
Chrome Current supported versions
Edge Current supported versions
Firefox Current supported versions
Safari Current supported versions
Mobile Safari Supported
Chrome Android Supported

The exact versions should be agreed with product/business requirements.


I would use Browserslist to communicate browser support to the build and tooling ecosystem.

Example:

> 1%
last 2 versions
not dead
not IE 11

The actual configuration should be based on the application’s real user base and business requirements.


Where necessary:

  • Use Babel/transpilation through the project’s build tooling.
  • Add polyfills only for APIs that actually need support.
  • Avoid unnecessarily shipping large polyfill bundles.
  • Verify third-party library browser support.

Before adopting a CSS feature, I would verify browser support.

For example:

CSS Feature
|
v
Browser Support Check
|
+---- Supported ----> Use
|
+---- Partial ------> Add fallback
|
+---- Unsupported --> Alternative implementation

I would also use progressive enhancement where appropriate.


I would combine automated tests with manual validation.

flowchart TD
    A[Application Build] --> B[Automated Tests]

    B --> C[Unit Tests]
    B --> D[Component Tests]
    B --> E[Accessibility Tests]
    B --> F[E2E Tests]

    A --> G[Responsive Testing]
    G --> H[Mobile]
    G --> I[Tablet]
    G --> J[Desktop]

    A --> K[Cross-Browser Testing]
    K --> L[Chrome]
    K --> M[Firefox]
    K --> N[Edge]
    K --> O[Safari]

Depending on project requirements:

  • Playwright
  • Cypress
  • BrowserStack
  • Selenium
  • Chrome DevTools
  • Firefox Developer Tools
  • Safari Web Inspector
  • Lighthouse
  • axe

I would use multiple layers of testing.

flowchart TD
    A[Code Change] --> B[Linting]
    B --> C[Unit Tests]
    C --> D[Component Tests]
    D --> E[Accessibility Tests]
    E --> F[Responsive Tests]
    F --> G[Cross-Browser Tests]
    G --> H[E2E Tests]
    H --> I[CI/CD]
    I --> J[Production]

Test isolated utilities and business logic.

Test:

  • Rendering
  • User interactions
  • Props
  • States
  • Error conditions

Validate:

  • Labels
  • Roles
  • Keyboard behavior
  • Accessible names
  • Focus behavior

Validate complete user journeys such as:

Login
Dashboard
Search
Open Details
Submit Form
Success

Before releasing a feature, I would verify:

  • Works on mobile
  • Works on tablet
  • Works on desktop
  • No horizontal scrolling unless intentionally designed
  • Images scale correctly
  • Text does not overflow
  • Buttons remain usable on touch devices
  • Forms work on smaller screens
  • Navigation works on mobile
  • Modals fit smaller viewports
  • Tables have an intentional mobile strategy
  • Loading and error states are responsive

  • Semantic HTML is used
  • All form fields have accessible labels
  • Keyboard navigation works
  • Focus indicators are visible
  • Focus is managed in modals/dialogs
  • Images have appropriate alternative text
  • Color contrast is sufficient
  • Information is not conveyed by color alone
  • Screen-reader behavior is verified
  • ARIA is used only where necessary
  • Error messages are accessible
  • Dynamic content is announced where appropriate

  • Reusable components are created
  • Common UI follows the design system
  • CSS is not duplicated unnecessarily
  • Business logic is separated from presentation
  • API calls are isolated in service modules
  • Common behavior is extracted into hooks
  • TypeScript types are defined where appropriate
  • ESLint and Prettier are configured
  • Components have tests
  • Reusable components are documented

  • Supported browsers are defined
  • Browserslist is configured
  • CSS features have been checked for compatibility
  • Required polyfills are identified
  • Third-party dependencies support target browsers
  • Responsive testing is performed
  • Cross-browser testing is automated where practical
  • Safari-specific issues are checked
  • Mobile browser behavior is verified
  • Critical E2E flows pass across supported browsers

As a lead, I would not consider this only a frontend developer responsibility. I would establish the standards at the team level.

My approach would be:

flowchart TD
    A[Define Requirements] --> B[Browser Support Matrix]
    B --> C[Responsive Design System]
    C --> D[Accessibility Standards]
    D --> E[Reusable React Components]
    E --> F[Implementation]
    F --> G[Automated Testing]
    G --> H[Cross-Browser Validation]
    H --> I[Code Review]
    I --> J[CI/CD Quality Gates]
    J --> K[Production Monitoring]

I would establish:

  1. Supported browser versions.
  2. Standard responsive breakpoints.
  3. Design tokens.
  4. Accessibility requirements.
  5. Reusable component standards.
  6. Testing standards.
  7. Definition of Done.
  8. CI/CD quality gates.

This prevents every developer from making their own decisions for common UI concerns.


“I would address this at four levels: responsive design, accessibility, maintainability, and compatibility.

For responsiveness, I would use a mobile-first approach with Flexbox and CSS Grid, responsive units, standardized breakpoints, and reusable React components. I would avoid fixed layouts and separate desktop/mobile implementations unless the user experience is fundamentally different.

For accessibility, I would follow WCAG guidelines and use semantic HTML, proper form labels, keyboard navigation, focus management, sufficient color contrast, and screen-reader support. Accessibility testing would be part of the development and CI process rather than something done only before release.

For maintainability, I would establish a reusable component library and design system with common tokens for colors, typography, spacing, and breakpoints. I would separate presentation, business logic, and API communication using components, hooks, and service layers. ESLint, Prettier, TypeScript, testing, and code reviews would enforce consistency.

For browser compatibility, I would first define a supported browser matrix based on our actual users and business requirements. I would configure Browserslist, use appropriate transpilation and polyfills, verify CSS and third-party library compatibility, and test critical flows across Chrome, Firefox, Edge, Safari, and mobile browsers.

Finally, I would automate as much as possible through unit tests, component tests, accessibility checks, responsive testing, and E2E tests using tools such as Playwright or Cypress. As a lead, my focus would be to establish these standards at the team level so that responsive, accessible, and maintainable UI becomes part of our normal development process rather than an afterthought.“


For a senior/lead candidate, the interviewer is usually looking beyond:

“I use media queries.”

A stronger answer demonstrates that you understand the engineering process around UI development.

They are looking for evidence that you can think about:

UI Quality
|
+--------------+--------------+
| | |
Responsive Accessible Maintainable
| | |
+--------------+--------------+
|
Cross-Browser
|
v
Production Quality

The strongest answer connects:

Design → Component Architecture → Accessibility → Testing → Browser Compatibility → CI/CD → Team Standards


A production-ready responsive React application should not be treated as simply a collection of CSS media queries.

A lead-level implementation should provide:

Area Approach
Responsiveness Mobile-first + Grid/Flexbox + responsive units
Accessibility WCAG + semantic HTML + keyboard + screen readers
Maintainability Reusable components + design system + separation of concerns
Code Quality TypeScript + ESLint + Prettier + code reviews
Browser Compatibility Browserslist + transpilation + selective polyfills
Testing Unit + component + accessibility + E2E
Cross-browser Chrome + Firefox + Edge + Safari + mobile
Team Process Standards + CI/CD quality gates + Definition of Done

Responsive → Mobile-first design and flexible layouts.

Accessible → WCAG, semantic HTML, keyboard support, and screen readers.

Maintainable → Reusable components, design system, clean architecture, and coding standards.

Compatible → Supported browser matrix, Browserslist, appropriate build tooling, and cross-browser testing.

Lead-level differentiator → Turn all of these into team-wide engineering standards and automated quality gates rather than relying on individual developer discipline.