Checkpoints - Do not use scripting to remove focus when focus is received
Why is this important?
Certain users may only be able to use a keyboard or a mouse but not a combination of both. When navigating on a page using one of these methods such as a keyboard, there are instances where the focus of where you are in the page is removed by a script. This is sometimes done by developers in instances where the focus is visually unappealing.
How can I resolve this issue?
Remove code or scripts that removes the focus on an HTML element. If focus was removed because the design does not look good when there is a focus, look into creating a design that works for the website rather than hiding the focus.
What topics do this checkpoint affect?
Accessibility (See WCAG 2, 2.1.1, 2.1.3, 2.4.7, 3.2.1)
Can you explain how this checkpoint works?
This checkpoint will look for the following HTML Elements:
The checkpoint will flag an issue if any of the attributes below are seen on the elements above: