Skip to content

[css-forms-1] font size for radio and checkbox inputs uses max() when it should use min() #13686

@dbaron

Description

@dbaron

The default styles in the spec currently say:

input[type=checkbox]:not([switch]),
input[type=radio] {
    /* These size rules ensure accessibility by following WCAG rules:
     * https://www.w3.org/WAI/WCAG22/Understanding/target-size-minimum.html */
    block-size: 1em;
    inline-size: 1em;
    font-size: max(1em, 24px);

    display: inline-flex;
    align-items: center;
    justify-content: center;
}

I think the font-size: max() should instead be a min(), given the comment, which suggests that the goal is ensuring that the target size is at least 24px. The style currently ensures that it is at most 24px, which seems wrong.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions