oficiodesign / initial-css

MIT License
4 stars 1 forks source link

Forbid `<a>` within `<label>` #127

Closed robsonsobral closed 1 year ago

robsonsobral commented 2 years ago

From MDN docs:

Interactive content

Don't place interactive elements such as anchors or buttons inside a label. Doing so makes it difficult for people to activate the form input associated with the label.

label a,
label button {
    @extend %warning;

    @include alert {
        content: 'do not place interactive elements such as `<anchors>` or `<buttons>` inside a label' !important;
    }
}