How do ARIA roles, keyboard navigation, and focus management contribute to accessible Salesforce UX?
Suggested answer
ARIA roles (Accessible Rich Internet Applications) supplement HTML semantics for complex widgets: role="dialog" identifies a modal, role="alert" announces dynamic status messages to screen readers, aria-expanded communicates accordion state. SLDS components include correct ARIA attributes out of the box — custom LWC components must add them explicitly. Keyboard navigation: All interactive elements must be reachable and operable via keyboard alone (Tab, Shift+Tab, Enter, Space, arrow keys). Salesforce Lightning enforces logical tab order following DOM order. Custom components must not break this with improper tabindex usage. Focus management: When a modal opens, focus must move to the first interactive element inside it and be trapped there (cannot Tab outside). When the modal closes, focus must return to the trigger element. Screen readers (NVDA, JAWS, VoiceOver) rely on this to maintain user orientation. Testing with keyboard-only navigation is the most common gap in Salesforce custom component audits.
Practice content for interview preparation; not an official vendor answer. Verify details against current product documentation.
Community comments (0)
No comments yet.
Sign in or create a free account to add a comment. Comments are moderated before they appear.