Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
257 changes: 257 additions & 0 deletions _rules/content-present-reflow-sc9kkf
Original file line number Diff line number Diff line change
@@ -0,0 +1,257 @@
---

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be a .md file. File extension is missing.

id: sc9kkf
name: Content is not missing at 320 CSS pixels
rules_format: 1.1
rule_type: atomic
description: |
This rule checks content is not missing when the viewport is set to 320 CSS pixels in the orientation of the text.
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 non-excepted element containing visible content or functional components, requiring text to reflow when the viewport is set to a width of 320 CSS pixels for horizontal languages or a height of 256 CSS pixels for vertical languages; to align applicability more closely with these reflow requirements, it can be refined to target only visible content with a height of at least 320 CSS pixels on pages with vertical scrolling, or a height of at least 256 CSS pixels on pages with horizontal scrolling.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. "non-excepted" What does that mean?
  2. did you mean (visible content) or (functional components) or visible (content or functional components)?
  3. "requiring text to reflow" How do I know if the text requires reflow? I would probably pull this and say regardless of if it requires reflow, if content disappears on.a 320x256 viewport that's a failure.
  4. "320 CSS pixels for horizontal languages" WCAG doesn't say this only applies to horizontal writing systems. Why would we limit it that way? Horizontal text can easily end up being clipped vertically when the width of the viewport changes.
  5. "to align applicability more closely with these reflow requirements..." I don't understand what this means or what its doing here.
  6. Does this include decorative content? For images, are you sure ANY truncation should result in a failure?
  7. Is it acceptable to replace larger things with smaller ones? Like a text "home" with a home icon for instance?
  8. You're not accounting for text that was clipped/hidden in the original view. Presumably content that's cut off in any resolution shouldn't fail this requirement.
  9. I think we need to specify the original viewport. If I start at 321x257 and then go to 320x256 that isn't likely to make much of a difference. I don't think people can test this consistently if we don't establish the starting resolution.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to rewrite this in my own words soon... maybe...

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start with 1280 x 1024 resolution going down to 320 to 256

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@HelenBurge HelenBurge Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Example - non-wrapping code - Wilco wants a pass - if the code must maintain a line then do not wrap it.

Procedure for code snippets
Display the web page in a user agent where the page can be zoomed, or the user agent can be resized.
Zoom in or resize the browser window so that the viewport is equivalent to 320 CSS pixels wide.
The code snippets fits within the width so that it is only necessary so scroll vertically to read each line of code.
Or, for code where non-wrapping lines are not essential, the code wraps or a mechanism is provided to allow line wrapping.
Or, the indentation and linebreaks are meaningful to the code language.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explain in background that the tester knows the language requirements

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clarify the reflow tests specifically
Text is not cutoff at 320 CSS pixels
Orientation scrolls do not exist at 320 CSS pixels without a content exception
Content is not missing at 320 CSS pixels - this is this one


## Expectation

Each target element:

Retains all content and functionality when viewed with a height of at least 320 CSS pixels on pages with vertical scrolling, or a height of at least 256 CSS pixels on pages with horizontal scrolling:
Comment on lines +30 to +32

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't exactly follow how to write an ACT rule. I'd do something like this:

Suggested change
Each target element:
Retains all content and functionality when viewed with a height of at least 320 CSS pixels on pages with vertical scrolling, or a height of at least 256 CSS pixels on pages with horizontal scrolling:
For each target element, when the viewport is set to 320 by 256 CSS pixels, the content is not cut off, removed, or obscured by another element, except if one of the following is true:
- the hidden content can be scrolled into view, or
- an [instrument][] is available to reveal the content.

I think you're throwing far too much at the wall here hoping to find issues.

  1. First you say things can't be cut off, and then you follow it up by saying it can if you can scroll it into view.
  2. "unavailable as a result of viewport constraints, zoom, or responsive behaviour;" what are these things, and how do I test them? I know at least 3 different zoom methods, which ones do you mean? I think this can be cut.

- Does not cut-off, remove, or make content unavailable as a result of viewport constraints, zoom, or responsive behaviour; and

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is truncation allowed at all? Like with the three dots.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - that is ok if the content is still available in a form - like the subsequent page

- Ensures that any content that is visually cut-off at this viewport size is still programmatically available and accessible to users, even if not immediately visible; and
- Allows a scroll because the content cannot change to the size of the screen without losing meaning.

## Background

This rule supports WCAG 2.1 Success Criterion 1.4.10 Reflow, which requires that content be presented without loss of information or functionality at a width equivalent to 320 CSS pixels. When content is missing at smaller viewport sizes, users may lose access to essential information or controls, even if the layout appears functional. Responsive design should reposition or adapt content, not remove it entirely, unless an equivalent mechanism provides access.

### Assumptions

There are no assumptions.

### Accessibility Support

There are no accessibility support issues known.

## Examples

### Passed

#### Passed Example 1

Content remains fully available after reflow.

```html
<div style="max-width: 100%;">
<p>
All text content remains visible and accessible when the viewport is reduced.
</p>
</div>
```

#### Passed Example 2

Navigation collapses into a menu but remains accessible. Content is not removed, only not immeditately visible behind an accessible control.

```html
<button aria-expanded="false">Menu</button>
<nav hidden>
<ul>
<li>Home</li>
<li>About</li>
<li>Contact</li>
</ul>
</nav>
```

#### Passed Example 3

Content is visually hidden on the first view but remains available programmatically and visual in a sub page.

```html
<p class="visually-hidden">
Additional instructions available to screen reader users.
</p>
```

#### Passed Example 4

Content is moved in the layout but still present.

```html
<style>
.sidebar {
order: 2;
}
</style>
<div class="sidebar">
<p>Sidebar content is still available, just repositioned.</p>
</div>
```

#### Passed Example 5

Images resize but are still visible.

```html
<img src="example.jpg" style="max-width: 100%;">
```

#### Passed Example 6

Form fields collapse in an accordian but remain accessible when expended.

```html
<form>
<label for="name">Name</label>
<input id="name" type="text">
</form>
```

#### Passed Example 7

Content requiring two-dimensional layout (covered under reflow exceptions).

```html
<table>
<tr><th>Column</th><th>Column</th></tr>
</table>
```

### Failed

#### Failed Example 1

Static content removed at smaller viewport.

```html
<style>
@media (max-width: 400px) {
.important-content {
display: none;
}
}
</style>
<div class="important-content">
This content disappears on smaller screens.
</div>
```

#### Failed Example 2

Navigation items removed instead of adapted.

```html
<style>
@media (max-width: 400px) {
nav li:nth-child(n+3) {
display: none;
}
}
</style>
<nav>
<ul>
<li>Home</li>
<li>About</li>
<li>Services</li>
<li>Contact</li>
</ul>
</nav>
```

#### Failed Example 3

Content visually clipped and inaccessible.

```html
<div style="height: 50px; overflow: hidden;">
<p>
Important content is hidden and cannot be accessed or revealed.
</p>
</div>
```

#### Failed Example 4

Content moved off-screen and not reachable when it should be visible.

```html
<div style="position: absolute; left: -9999px;">
Hidden content that cannot be accessed by users.
</div>
```

#### Failed Example 5

Interactive element missing at smaller viewport.

```html
<style>
@media (max-width: 400px) {
button {
display: none;
}
}
</style>
<button>Submit</button>
```

#### Failed Example 6

Image removed without alternative.

```html
<style>
@media (max-width: 400px) {
img {
display: none;
}
}
</style>
<img src="important-diagram.png" alt="Important diagram">
```

#### Failed Example 7

Collapsed content has no mechanism to access it.

```html
<div style="display: none;">
<p>This content is permanently hidden.</p>
</div>
```

### Inapplicable

#### Inapplicable Example 1

Content explicitly hidden from all users.

```html
<div hidden>
Hidden content not intended for display.
</div>
```

#### Inapplicable Example 2

Content outside the user viewport by design (e.g. off-canvas patterns before interaction).

```html
<div aria-hidden="true" class="offscreen-menu">
Menu content appears only when activated.
</div>
```