diff --git a/_rules/text-cutoff-reflow-lf4ym8 b/_rules/text-cutoff-reflow-lf4ym8 new file mode 100644 index 0000000000..b93a8be223 --- /dev/null +++ b/_rules/text-cutoff-reflow-lf4ym8 @@ -0,0 +1,339 @@ +--- +id: lf4ym8 +name: Text is not cutoff at 320 CSS pixels +rules_format: 1.1 +rule_type: atomic +description: | + This rule checks content does not require a scroll in the orientation of the text when the viewport is set to 320 CSS pixels. +accessibility_requirements: + wcag21:1.4.10: # Reflow (AA) + forConformance: true + failed: not satisfied + passed: further testing needed + inapplicable: further testing needed +input_aspects: + - DOM Tree + - CSS Styling +acknowledgments: + authors: + - Helen Burge + previous_authors: + - +--- + +## Applicability + +This rule applies to any element containing visible text that is rendered at 320 CSS pixels in the orientation of the text. + +## Expectation (1) + +Each target element: +- Has all text fully visible within the viewport, without being clipped, truncated, or hidden off-screen when viewed at 320 CSS pixels; and +- Does not require scrolling in the direction of reading to reveal portions of text; and +- Preserves all information and functionality associated with the text content. + +## Background + +This rule supports WCAG 2.1 Success Criterion 1.4.10 Reflow, which requires that content can be presented without loss of information or functionality and without requiring scrolling in two dimensions at a width equivalent to 320 CSS pixels. + +### Assumptions + +There are no assumptions. + +### Accessibility Support + +There are no accessibility support issues known. + +## Examples + +### Passed + +#### Passed Example 1 + +Text wraps correctly and remains fully visible at 320 CSS pixels. + +```html +
+ This paragraph reflows and wraps within the viewport, + ensuring all text is visible without horizontal scrolling. +
++ Content adapts to the viewport and remains fully readable at 320 CSS pixels. +
++ ThisIsAnExtremelyLongWordThatWouldOtherwiseOverflowButNowWrapsCorrectlyWithinTheViewport. +
+``` + +#### Passed Example 4 + +Content inside a flexible grid reflows to a single column. + +```html + +All text remains visible and reflows correctly.
++ This is a sentence with inline elements that wrap correctly + when the viewport is reduced. +
+``` + +#### Passed Example 6 + +Scrollable container used only for non-text, while text remains fully visible. + +```html ++ The text content is fully visible and not clipped, even though other + components on the page may scroll. +
+
+const veryLongVariableName = "example";
+
+
+```
+
+#### Passed Example 11
+
+Whiteboard or drawing canvas. User-generated spatial content cannot be meaningfully reflowed.
+
+```html
+
+```
+
+### Failed
+
+#### Failed Example 1
+
+Text is cut off due to a fixed-width container.
+
+```html
+
+```
+
+#### Failed Example 2
+
+Text is truncated and not fully readable.
+
+```html
+
+```
+
+#### Failed Example 3
+
+Overflow causes text to extend outside the viewport.
+
+```html
++ This text spills خارج the viewport and requires horizontal scrolling to read fully. +
++ Part of this text is pushed خارج the viewport and not visible. +
++ SupercalifragilisticexpialidociousSupercalifragilisticexpialidocious +
+``` + +#### Failed Example 6 + +Clipping hides text content. + +```html + +``` + +#### Failed Example 7 + +Text overlaps and hides other text when reflowing. + +```html +First line of text
+Second line overlaps and obscures the first
++ This text requires horizontal scrolling to read fully, which fails the requirement. +
+
+function example() {
+ console.log("Horizontal scrolling may be required");
+}
+
+```
+
+#### Inapplicable Example 2
+
+Element does not present visible text to the user.
+
+```html
+
+```
+
+#### Inapplicable Example 3
+
+Mathematical formula requiring spatial layout. The meaning depends on spatial formatting that may not fully reflow without loss of meaning.
+
+```html
+
+```
+
+#### Inapplicable Example 5
+
+Large chart or graph. Charts require spatial relationships that cannot be preserved through text reflow.
+
+```html
+
+```
+
+#### Inapplicable Example 6
+
+Side-by-side comparison layout where structure conveys meaning. The meaning relies on a two-dimensional comparison layout.
+
+```html
+