Each user interface component (e.g., form elements, buttons, links) has a name and/or role attribute.
Invalid role attribute:
This custom checkbox has an invalid role attribute:
(This checkbox has role="table")
Note: Hard to auto-test. Requires a human tester/AI to determine if a role attribute describes the function of its parent element.