Focus Flashcards
Which elements can receive keyboard focus?
Elements that are interactive by default (e.g., links, buttons, inputs) or those with tabindex attributes.
Why should you avoid using outline: none in CSS?
It removes the focus indicator, making it harder for keyboard users to navigate.
Why shouldn’t you replace outline styles with box-shadow for focus indicators?
box-shadow does not appear in Windows High Contrast mode, reducing accessibility.
Why should you avoid setting positive values for tabindex?
It disrupts the natural tab order and can cause accessibility issues.
What should you ensure about the focus state of elements?
The focus state should be very clear and visible to improve accessibility.