-
Notifications
You must be signed in to change notification settings - Fork 84
Create Reflow Tests #2429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Create Reflow Tests #2429
Changes from all commits
f89d5d3
7aa38a5
dd72c25
c595151
0a6d522
4166678
8de47f2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,285 @@ | ||||||
| --- | ||||||
| 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 element containing visible content or functional components. It is rendered when the viewport is set to 320 CSS pixels in the orientation of the text. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can refine the applicability even further. For example, it could apply only to visible content with:
This would align the applicability more closely with the corresponding reflow requirements
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
the current wording implies that if the content is hidden at 320 CSS pixels, the rule is not applicable, which isn't our intent |
||||||
|
|
||||||
| ## Expectation (1) | ||||||
|
|
||||||
| Each target element: | ||||||
| Retains all content and functionality when viewed at 320 CSS pixels; and | ||||||
| - Does not hide, remove, or make content unavailable as a result of viewport constraints, zoom, or responsive behaviour; and | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd say this is ambiguous. For example, a navigation menu that is expanded by default on desktop but programmatically hidden on mobile until the user activates the hamburger menu could be interpreted as violating this requirement. I think we need more precise wording than "hide" to avoid unintentionally including these common responsive design patterns |
||||||
| - Ensures that any content that is visually hidden at this viewport size is still programmatically available and accessible to users. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With the examples that you included that always hide content, I feel like we may need to define a way to compare before and after. For example, should we compare content at 1280 vs 320?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd agree with @G0dwin. We first need to define the default view
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.4.10 is fundamentally a visual requirement. While we as ACT CG don't necessarily need to cover every aspect of the SC, marking this as a pass seems risky to me. The fact that the content remains programmatically available does not help people who need to zoom or reflow the page to access it visually. From a user's perspective, the content is still effectively unavailable.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also, in the first bullet we are saying not to hide or remove the content, whereas here we're saying that content that cannot be hidden (and is visually hidden) is programmatically available. I understand that the intent (even though I don't agree) is for the first bullet to cover programmatically hidden content and the second to cover only visually hidden content. However, that distinction isn't clear from the current wording |
||||||
|
|
||||||
| ## 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 reflows but remains fully available. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
My feeling is that the use of "but" gives the sentence a negative tone |
||||||
|
|
||||||
| ```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 hidden 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> | ||||||
| ``` | ||||||
|
Comment on lines
+63
to
+76
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO, this doesn't fully reflect the expectation. I agree with the example and that it should be a pass, but it doesn't align particularly well with the wording of the expectation |
||||||
|
|
||||||
| #### Passed Example 3 | ||||||
|
|
||||||
| Content is visually hidden but remains available programmatically. | ||||||
|
|
||||||
| ```html | ||||||
| <p class="visually-hidden"> | ||||||
| Additional instructions available to screen reader users. | ||||||
| </p> | ||||||
| ``` | ||||||
|
Comment on lines
+78
to
+86
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 1.4.10 is fundamentally a visual requirement. While we as ACT CG don't necessarily need to cover every aspect of the SC, marking this as a pass seems risky to me. The fact that the content remains programmatically available does not help people who need to zoom or reflow the page to access it visually. From a user's perspective, the content is still effectively unavailable. |
||||||
|
|
||||||
| #### Passed Example 4 | ||||||
|
|
||||||
| Content is moved in the layout but still present. | ||||||
|
|
||||||
| ```html | ||||||
| <style> | ||||||
| .sidebar { | ||||||
| order: 2; | ||||||
| } | ||||||
| </style> | ||||||
|
Comment on lines
+93
to
+97
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think this works in practice unless the element is inside a flex or grid container |
||||||
| <div class="sidebar"> | ||||||
| <p>Sidebar content is still available, just repositioned.</p> | ||||||
| </div> | ||||||
| ``` | ||||||
|
|
||||||
| #### Passed Example 5 | ||||||
|
|
||||||
| Accordion reveals content without removing it. | ||||||
|
|
||||||
| ```html | ||||||
| <button aria-expanded="false">Show details</button> | ||||||
| <div hidden> | ||||||
| <p>Additional content remains available when expanded.</p> | ||||||
| </div> | ||||||
| ``` | ||||||
|
Comment on lines
+105
to
+112
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as example 2 |
||||||
|
|
||||||
| #### Passed Example 6 | ||||||
|
|
||||||
| Images resize but are still visible. | ||||||
|
|
||||||
| ```html | ||||||
| <img src="example.jpg" style="max-width: 100%;"> | ||||||
| ``` | ||||||
|
|
||||||
| #### Passed Example 7 | ||||||
|
|
||||||
| Form fields collapse but remain accessible. | ||||||
|
|
||||||
| ```html | ||||||
| <form> | ||||||
| <label for="name">Name</label> | ||||||
| <input id="name" type="text"> | ||||||
| </form> | ||||||
| ``` | ||||||
|
Comment on lines
+122
to
+131
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unclear |
||||||
|
|
||||||
| #### Passed Example 8 | ||||||
|
|
||||||
| Content requiring two-dimensional layout (covered under reflow exceptions). | ||||||
|
|
||||||
| ```html | ||||||
| <table> | ||||||
| <tr><th>Column</th><th>Column</th></tr> | ||||||
| </table> | ||||||
| ``` | ||||||
|
Comment on lines
+135
to
+141
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see the 1.4.10 exception, but I don't see any exception for this in our rule |
||||||
|
|
||||||
| ### Failed | ||||||
|
|
||||||
| #### Failed Example 1 | ||||||
|
|
||||||
| 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. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a repetition of the first example. Does this add or clarify something that the first example doesn't cover? |
||||||
|
|
||||||
| ```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. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It looks to me like this content would not be available at any viewport size, this is also a common valid technique for applying text only available to AT.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, we need a default state where this is available. In any case, this also seems to contradict the expectation |
||||||
|
|
||||||
| ```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 | ||||||
|
|
||||||
| Decorative content. | ||||||
|
|
||||||
| ```html | ||||||
| <div role="presentation"> | ||||||
| Decorative content only. | ||||||
| </div> | ||||||
| ``` | ||||||
|
Comment on lines
+252
to
+256
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no mention of decorative content in either the SC or this rule. As written, this cannot be marked as inapplicable. Also, even if we decide to move in that direction (and I'm not convinced we should), I would replace the text with a decorative image, since the concept of "decorative text" is debatable |
||||||
|
|
||||||
| #### Inapplicable Example 2 | ||||||
|
|
||||||
| Content explicitly hidden from all users. | ||||||
|
|
||||||
| ```html | ||||||
| <div hidden> | ||||||
| Hidden content not intended for display. | ||||||
| </div> | ||||||
| ``` | ||||||
|
|
||||||
| #### Inapplicable Example 3 | ||||||
|
|
||||||
| 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> | ||||||
| ``` | ||||||
|
|
||||||
| #### Inapplicable Example 4 | ||||||
|
|
||||||
| Content that is replaced by an equivalent alternative. The full content is replaced with an equivalent that preserves meaning. | ||||||
|
|
||||||
| ```html | ||||||
| <p class="mobile">Short summary version</p> | ||||||
| <p class="desktop">Full detailed version</p> | ||||||
| ``` | ||||||
|
Comment on lines
+278
to
+285
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no mention of alternative in this rule. As written, this cannot be marked as inapplicable. |
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would encourage following the wording of the requirement.
As described in the understanding doc:
the orientation of the text is relevant in determining the applicable requirement. As currently written, the text appears to imply that the requirement is always 320 CSS pixels, even for vertically oriented content, which is inconsistent with the criterion.