SC 2.1.1 should include warning for onclick events · Issue #88 · squizlabs/HTML_CodeSniffer · GitHub
Skip to content

SC 2.1.1 should include warning for onclick events #88

Description

@majornista

HTML_CodeSniffer makes a poor assumption that onclick event handlers will only be assigned to focusable elements like links and buttons. It does not currently throw a warning when generic elements like "div" or "span" are have onclick event handlers. The sniff should probably evaluate whether or the element focusable and throw a warning/error if it is not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions