Skip to content

[css-fonts-5] Text Fitting: Default scaling limit #12886

@kizu

Description

@kizu

In the original issue we received valuable feedback that a native fit-to-width solution can potentially introduce a simple way for authors to violate Success Criterion 1.4.4 Resize Text, in the same way many existing fit-to-text and other responsive typography approaches already do.

My proposed solution involves introducing a default limit equal to 200% of the original font-size. This, with all major browsers being able to provide at least 400% full-page zoom, will allow to scale any text that uses fit-to-width without overriding this limit.

This limit is just a default, allowing authors to control it, and increase/decrease based on their design goals: there are cases where the absence of the limit won't cause the SC 1.4.4 violations, and we shouldn't limit authors there. And, realistically, we can't — but we should do what we can and introduce basic safeguards to the spec, so it won't be easy to violate WCAG with the new property.

In Google Chrome team's feedback they mention this about this proposal:

  • Accessibility: If the width of a container with text-grow or text-shrink depends on the viewport width, changing the page zoom level might not alter the physical text size in that container because its physical width remains unchanged.
    We currently do not have a solution for this issue, and are not sure if the "200% size limit" solution discussed in this issue will work well.

I would be interested to know reasons why Chrome's team thinks why this limit won't work well.

But without any alternative proposals to safeguard against violating SC 1.4.4, I believe the built-in default limit is the way to go.

So far, I did not read any other proposals that would cover this issue, but if there are any — please, post them in this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a11y-trackerGroup bringing to attention of a11y, or tracked by the a11y Group but not needing response.css-fonts-5

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions