Skip to content

Create text-cutoff-reflow-lf4ym8 - #2447

Draft
WilcoFiers wants to merge 2 commits into
developfrom
text-cutoff-reflow-lf4ym8
Draft

WilcoFiers wants to merge 2 commits into
developfrom
text-cutoff-reflow-lf4ym8

Conversation

@WilcoFiers

Copy link
Copy Markdown
Member

First draft of the text-cutoff-reflow rule: text is not cutoff at 320 CSS pixels.

Split from #2429 so each reflow rule can be reviewed independently. Original work by @HelenBurge.

Related to #2424.

Need for Call for Review:
This will require a 2 weeks Call for Review


Pull Request Etiquette

When creating PR:

  • Make sure you're requesting to pull a branch (right side) to the develop branch (left side).
  • Make sure you do not remove the "How to Review and Approve" section in your pull request description

After creating PR:

  • Add yourself (and co-authors) as "Assignees" for PR.
  • Add label to indicate if it's a Rule, Definition or Chore.
  • Link the PR to any issue it solves. This will be done automatically by referencing the issue at the top of this comment in the indicated place.
  • Optionally request feedback from anyone in particular by assigning them as "Reviewers".
  • If your PR is for a new rule with an Accessibility Support note, or for updating the Accessibility Support note of an existing section, make sure to open a corresponding Accessibility Support issue.

When merging a PR:

  • Close any issue that the PR resolves. This will happen automatically upon merging if the PR was correctly linked to the issue, e.g. by referencing the issue at the top of this comment.

How to Review And Approve

  • Go to the “Files changed” tab
  • Here you will have the option to leave comments on different lines.
  • Once the review is completed, find the “Review changes” button in the top right, select “Approve” (if you are really confident in the rule) or "Request changes" and click “Submit review”.
  • Make sure to also review the proposed Call for Review period. In case of disagreement, the longer period wins.

Made with Cursor

Split from #2429. Original work by Helen Burge.

Co-authored-by: HelenBurge <41951878+HelenBurge@users.noreply.github.com>
@WilcoFiers WilcoFiers added the Rule Use this label for a new rule that does not exist already label Aug 31, 2026
@WilcoFiers WilcoFiers mentioned this pull request Aug 31, 2026
8 tasks
@netlify

netlify Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

❌ Deploy Preview for act-rules failed.

Name Link
🔨 Latest commit becae18
🔍 Latest deploy log https://app.netlify.com/projects/act-rules/deploys/6ab14020f4b3de0008ee8805

@Pryzmastudio

Copy link
Copy Markdown

Following up on my reflow data for #2446: this draft has no reviews yet, so here's what I found running its examples with the same setup (each example as its own page in Chrome 156, measured at 1280×1024 and 320×256, plus floorcheck's reflow check at 320px).

1. Most failed examples fail by scrolling, not by cutting text off. Failed Examples 1, 3, 4, 5 and 8 make the whole page scroll sideways at 320px (by 288, 188, 95, 118 and 8px), and in each of them all the text can be reached by scrolling. In Failed Example 1, for instance, overflow: hidden on the 600px div clips nothing, since the paragraph fits inside it, and the page just scrolls. That's what #2446 tests, and floorcheck's scroll check fails exactly these five. Only Failed Examples 2, 6 and 7 are about text that is clipped or covered while the page doesn't scroll. Helen's list in #2445 keeps "Text is not cutoff" and "Orientation scrolls do not exist" as separate rules, so the scroll examples and the second bullet of the expectation might fit better in #2446.

2. Two failed examples look the same at 1280×1024. Failed Example 2 (a 200px box with an ellipsis) is truncated the same way at 1280×1024, and the two paragraphs in Failed Example 7 overlap by 8px at both sizes. Wilco suggested on #2445 scoping the rule to content that is visible in the wide view and hidden in the narrow view. If that applies here too, these two need something that only happens at the narrow size, like a media query. Failed Example 6 is the clean case: the paragraph fits on one line at 1280, and at 320 its second line is cut at the 40px edge.

3. Passed and inapplicable examples overlap.

  • Passed Example 11 and Inapplicable Example 5 are both an empty <canvas> (300×150, no text). Passed Example 10 and Inapplicable Example 4 are both an <img> with alt text whose file doesn't exist, so only the alt text shows.
  • Inapplicable Examples 3, 6 and 7 have visible text that fits at 320px ("E = mc²", "Before" and "After", "Bold | Italic | Underline"). Nothing in the applicability excludes content that needs a two-dimensional layout, so as written they're applicable and pass. The classes they rely on (.math, .comparison, .editor, and .calendar and #map in the passed examples) have no CSS, so each of them renders as a single column of plain text.

Smaller things:

  • The code block of Passed Example 7 isn't closed and "Passed Example 8" is missing its ####, so the two come out as one test case with the heading text on the page.
  • Failed Examples 3 and 4 have the Arabic word "خارج" ("outside") in the English sentence, probably left over from a translation.
  • Failed Example 4 says "partially off-screen", but at 320px the paragraph starts at x=358, so it's entirely outside the viewport.
  • The code line in Passed Example 8 is 304px wide, which fits at 320px, so its scroll box never scrolls.

Happy to rerun these whenever the examples change.

I used an AI assistant to help run the checks and draft this comment. I verified the results myself.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Rule Use this label for a new rule that does not exist already

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants