Frontend Development Standards
Blazor Component Development
- •MUST follow accessibility guidelines (ARIA roles, keyboard navigation, screen reader support)
- •MUST implement proper error boundaries and exception handling
- •SHOULD use code-behind files (
.razor.cs) for complex component logic - •SHOULD lazy-load routes and components where appropriate to optimize initial load
- •MUST validate user input on both client and server sides
Code Quality
- •MUST use company ESLint + Prettier config for JavaScript/TypeScript; build must fail on lint errors
- •MUST follow C# coding standards for Blazor code-behind files
- •SHOULD use CSS isolation for component styles to prevent style conflicts
- •SHOULD minimize JavaScript interop; prefer Blazor-native solutions
Performance
- •SHOULD lazy-load routes and code-split bundles > 250 KB
- •MUST implement virtualization for large lists
- •SHOULD use streaming rendering for Server-Side Rendering (SSR) scenarios
- •MUST optimize images and static assets
Observability
- •MUST emit OpenTelemetry web-vital spans to New Relic Browser
- •SHOULD implement proper logging for client-side errors
- •SHOULD track user interactions for analytics when appropriate
Accessibility (WCAG 2.1 AA)
- •MUST render accessible components with proper semantic HTML
- •MUST provide keyboard navigation for all interactive elements
- •MUST include proper ARIA labels and roles
- •MUST maintain sufficient color contrast ratios
- •MUST test with screen readers