Skip to content
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

Updated Reflow understanding doc #4055

Draft
wants to merge 125 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 81 commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
1cb8c80
Updated Reflow understanding doc
scottaohara Sep 5, 2024
8d0f1f9
Update reflow.html
scottaohara Sep 5, 2024
b1e767f
Update understanding/21/reflow.html
scottaohara Sep 6, 2024
7504dd2
Update understanding/21/reflow.html
scottaohara Sep 6, 2024
005e080
new graphics used in the examples
scottaohara Sep 10, 2024
60c3d71
add img folder to all new img src
scottaohara Sep 13, 2024
8c2236e
note for sticky/fixed content
scottaohara Sep 13, 2024
54adc01
fix missing word in 'what to do'
scottaohara Sep 13, 2024
627dbc5
add clarifying note to 320x256 section
scottaohara Sep 13, 2024
bf3d520
pull in missing content from the external doc
scottaohara Sep 13, 2024
6d1d428
revise initial intent paragraphs
scottaohara Sep 25, 2024
89cecfe
updates to reflow doc
scottaohara Oct 3, 2024
5e1ee84
content updates
scottaohara Oct 3, 2024
cfb36fb
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
scottaohara Oct 4, 2024
a6dd504
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
scottaohara Oct 15, 2024
2453865
updates per external feedback
scottaohara Oct 18, 2024
633eaa2
finish addressing external feedback
scottaohara Oct 18, 2024
473a63b
adjust example image widths
scottaohara Oct 23, 2024
030256f
re-arrange and fix p markup
scottaohara Oct 23, 2024
845c55a
rewording of reorganized content
scottaohara Oct 23, 2024
ca79e05
new example screenshot
scottaohara Oct 23, 2024
6296a9e
simplify wording
scottaohara Oct 23, 2024
9dcfcbd
addressing issue 887
scottaohara Oct 23, 2024
ac903e5
fix incomplete sentence and punctuation fixes
scottaohara Oct 23, 2024
a475898
Create g20x.html
scottaohara Oct 24, 2024
67e1761
Update understanding/21/reflow.html
scottaohara Oct 25, 2024
bc1d2f5
off screen to off-screen
scottaohara Oct 25, 2024
2fdad82
Update understanding/21/reflow.html
fstrr Oct 26, 2024
3670020
Update techniques/general/g20x.html
scottaohara Nov 4, 2024
b89e94f
address some of the feedback
scottaohara Nov 19, 2024
7597c58
updates to first intent paragraph
scottaohara Nov 19, 2024
9fe9bae
add more content to new indentation technique
scottaohara Nov 22, 2024
9db3dba
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
9034790
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
8ffffcf
remove in-page link / text that was broken
scottaohara Nov 22, 2024
acbbb3f
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
389a46e
more wording updates
scottaohara Nov 22, 2024
dd46e18
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
d2f5623
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
ef48bf4
Update reflow.html
scottaohara Nov 22, 2024
295747f
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
9eea703
Update understanding/21/reflow.html
scottaohara Nov 22, 2024
5f390a5
Move image to correct folder
patrickhlauke Nov 29, 2024
5e478ab
Subtly anonymise NPR examples, fix typos
patrickhlauke Nov 29, 2024
bf3507f
Tweak carousel images
patrickhlauke Nov 29, 2024
7db653d
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
patrickhlauke Nov 29, 2024
17da9a4
Revise paragraph on table + paragraph reflow expectations
scottaohara Dec 6, 2024
5287894
Update understanding/21/reflow.html
scottaohara Dec 6, 2024
62dd7eb
Update understanding/21/reflow.html
scottaohara Dec 6, 2024
e720c0a
Update understanding/21/reflow.html
scottaohara Dec 6, 2024
37ff092
Update alt text for code-diff gif
scottaohara Dec 6, 2024
be502a6
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
patrickhlauke Dec 7, 2024
9716370
Update understanding/21/reflow.html
scottaohara Dec 18, 2024
4067f0d
Update understanding/21/reflow.html
scottaohara Dec 18, 2024
bb187a5
Working example of a new horizontally scrollable panel for the update…
giacomo-petri Dec 19, 2024
ccf6efa
Technique of a new horizontally scrollable panel for the updated refl…
giacomo-petri Dec 19, 2024
573a3dc
pull in suggestions
scottaohara Dec 19, 2024
75cd4c4
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
patrickhlauke Dec 31, 2024
7bd05ba
intent revisions
scottaohara Jan 8, 2025
292aad8
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
scottaohara Jan 17, 2025
22cf5e1
a few more intent updates
scottaohara Jan 21, 2025
d6b16ee
revert in brief text
scottaohara Jan 23, 2025
161fd19
new sections added, and further rewording
scottaohara Jan 23, 2025
0a12d36
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
scottaohara Jan 24, 2025
d1e83a1
Add files via upload
scottaohara Jan 24, 2025
1d98aa6
Rename g20x.html to g301.html
scottaohara Jan 24, 2025
b2c67a3
Rename g20x2.html to g302.html
scottaohara Jan 24, 2025
2d7de42
significant restructuring of the understanding doc
scottaohara Jan 25, 2025
41a7bfd
fix typo
scottaohara Jan 31, 2025
c4412a2
cut down initial note
scottaohara Feb 4, 2025
b5250f4
cutting down first note some more
scottaohara Feb 4, 2025
4ffe380
Delete understanding/21/img/reflow-macbook-resolutions.jpg.jpg
scottaohara Feb 4, 2025
94c36c4
simplify figcaption text
scottaohara Feb 4, 2025
b984ba5
revise more content
scottaohara Feb 4, 2025
ac01e6f
Fix image file extension for figure 16
scottaohara Feb 4, 2025
77ff758
relocate content from note 1
scottaohara Feb 4, 2025
b762a5e
code snippet working examples
scottaohara Feb 4, 2025
b67b061
Update index.html
scottaohara Feb 4, 2025
89fc3bf
revise 301 tech
scottaohara Feb 5, 2025
d4eb537
revise g301
scottaohara Feb 5, 2025
9bcd667
add working example for new 301 tech
scottaohara Feb 5, 2025
795fd4c
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
aeded95
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
6aeeb00
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
b065239
revert merged suggestion
scottaohara Feb 6, 2025
b9707ec
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
54a691e
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
1028d0c
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
28b3c4c
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
7714c1d
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
3f1d823
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
0c181ef
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
333b9b5
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
a0c7e38
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
de88e1c
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
d3f4342
Update understanding/21/reflow.html
scottaohara Feb 6, 2025
739f907
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
d83480a
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
e729d5f
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
0d448bd
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
08503e5
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
76bc862
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
24e4e7b
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
92cc454
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
6f68917
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
8d1a094
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
b42e91e
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
c32f5dd
Update understanding/21/reflow.html
scottaohara Feb 7, 2025
9a80c83
revise intro paragraph for 'reflowing websites and apps'
scottaohara Feb 7, 2025
89e32aa
adjust intro to 'content that can benefit from 2-d layout..." section
scottaohara Feb 7, 2025
0e1dca5
remove swimlanes and adjust content accordingly
scottaohara Feb 7, 2025
ce25641
Create .gitignore
scottaohara Feb 7, 2025
21d7ef1
add video files
scottaohara Feb 7, 2025
8c53c64
Rename carousel-pass-fail.mp4 to carousel-fail.mp4
scottaohara Feb 7, 2025
6a1a1a6
Add video elements and update carousel descriptions
scottaohara Feb 7, 2025
6c24b78
Delete understanding/21/video/.gitignore
scottaohara Feb 7, 2025
8e42728
Update image width from 550px to 320px
scottaohara Feb 7, 2025
778f719
Add files via upload
scottaohara Feb 7, 2025
fe61c6d
Update video source paths and content exception text
scottaohara Feb 7, 2025
44bcdd6
make videos smaller to take up less vertical space
scottaohara Feb 7, 2025
a21b5d4
address gundula's request
scottaohara Feb 11, 2025
c74a78b
pull in last of francis's suggestions
scottaohara Feb 11, 2025
9a9a3ae
add example files
scottaohara Feb 12, 2025
9457400
add new pass/fail example in the table/grid section
scottaohara Feb 12, 2025
cbac8a2
Merge branch 'main' into scottaohara-reflow-understanding-rewrite
scottaohara Feb 13, 2025
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
189 changes: 189 additions & 0 deletions techniques/general/g301.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Accounting for meaningful text indentation and Reflow</title>
<link rel="stylesheet" href="../../css/sources.css" class="remove"/>
</head>
<body>
<h1>Accounting for meaningful text indentation and Reflow</h1>
<section class="meta"><p class="id">ID: G301</p><p class="technology">Technology: general</p><p class="type">Type: Technique</p></section>
<section id="applicability">
<h2>When to Use</h2>
<p>All technologies that support style switching</p>
</section>

<section id="description">
<h2>Description</h2>
<p>There can be instances where indentation of text is considered important to the presentation and understandability of the text content. If the indentations were to be removed, then meaning or functionality could suffer. For instance, the nesting of unordered lists can be harder to notice if indentations are removed. Additionally, maintaining indentations can be important to help understand code patterns, if not even necessary for the code to function.</p>
<p>Since maintaining indentation is important for these instances of text, two-dimensional scrolling of these distinct sections of content could be necessary. However, there are still styling modifications that could be made to help ensure the indentation was maintained, but as much text was made visible within the viewport as possible. Making such adjustments could limit, if not mitigate any two-dimensional scrolling from occurring, making the content easier for people to read.</p>
</div>
</section>

<section id="examples">
<h2>Examples</h2>
<section class="example">
<p>A website conveys information in a nested list format. The understandability of the list hierarchy is supported by the indentation of the list content. While it is important for the individual list item text to reflow, the list hierarchy would suffer if flattened so that all content would fit within a 320 CSS pixel wide viewport.</p>
<p>The following example list contains additional nested lists to provide more context for each of the parent list item's text. To maintain the visual hierarchy, the indentation of each list level remains present, but modified once an author defined CSS breakpoint is met. Additional styles are set for different breakpoints to mitigate against the potential for content to extend beyond a 320px wide viewport, while accounting for visual spacing against the borders of the viewport, to attempt to make the content not feel cramped. At the smallest breakpoint, the content of list items receive a minimum width to mitigate against potentially "squished" content lists with many nested levels. At this breakpoint, each nested list level can be horizontally scrolled into view, and once a nested list is visible within the viewport, only vertical scrolling will be necessary to read the content of the nested list's items.</p>
<pre>
&lt;div class="example">
&lt;ul>
&lt;li>
&lt;p>Make a list using one of the HTML list elements, or even an ARIA <code>role=list</code> container.&lt;/p>
&lt;ul>
&lt;li>
&lt;p>There are three types of lists in HTML which can contain list items (<code>li</code> elements.&lt;/p>
&lt;ul>
&lt;li>&lt;p>the <code>ul</code> element&lt;/li>
&lt;li>&lt;p>the <code>ol</code> element&lt;/li>
&lt;li>&lt;p>the <code>menu</code> element&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Another type of list, description lists, exist as well - but they do not contain list items (<code>li</code> elements).&lt;/p>
&lt;/li>
...
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>Neither the start or end tags of any of the HTML list elements are omissible.&lt;/p>
&lt;ul>
&lt;li>&lt;p>The end tags of <code>li</code> elements can be omitted if the <code>li</code> element is immeditely followed by another <code>li</code> element or there is no more content in the parent list element.&lt;/p>
&lt;/li>
...
&lt;/ul>
&lt;/li>
...
&lt;/ul>
&lt;/div>
</pre>
<pre>
*, *::before, *::after {
box-sizing: border-box;
}
body, html {
font-family: arial;
}
@media screen and ( max-width: 640px ) {
.example {
overflow: auto;
max-width: 640px;
}
ul {
padding-inline-start: 1.25em;
}
li p {
padding: .25em;
margin: .5em 0 .5em -.25em;
max-width: 300px; /* saftey net for max-width */
}
}
@media screen and ( max-width: 400px ) {
ul { padding-inline-start: 1em; }
li p { min-width: 300px } {
min-width: 300px;
}
}
</pre>
<p>A working example of <a href="../../working-examples/reflow-nested-lists">a list where nested levels can be read within a 320px wide viewport</a>.</p>
</section>

<section class="example">
<p>A website providing code snippets needs to maintain line indentations, as the indentations are meaningful not only to the structure of the code, but in some languages - such as with Python, are requirements when defining blocks of code.</p>
<p>As a user zooms in the web page, the CSS of the indentation can be adjusted to maintain this necessary structure, while also allowing more text to be visible on a single line.</p>

<p>The following represents a Python code example. The indentation of each line of text is necessary to create a group of statements that are executed as a block.</p>
<pre>
def complex_function(x):
if x > 0:
for i in range(x):
if i % 2 == 0:
print(f"{i} is even")
for a in range(i):
if a % 5 == 0:
print(f" {a} can be divided by 5")
else:
print(f" {a} cannot be divided by 5")
else:
print(f"{i} is odd")
for a in range(i):
if a % 2 == 0:
print(f" {a} is even")
else:
print(f" {a} is odd")
else:
print("x is not a positive number")
</pre>
<p>The following code example demonstrates the use of indentation to convey the nesting of elements in an HTML document:</p>
<pre>
&lt;html lang=en>
&lt;head>...&lt;/head>
&lt;body>
&lt;div>
&lt;!-- ... keep indenting as necessary -->
&lt;/div>
&lt;/body>
&lt;/html>
</pre>
<p>The indentation of code blocks like these could be adjusted at different viewport sizies, via a CSS Media Query.</p>
<pre>
@media screen and ( min-width: 320px ) {
pre {
tab-size: 8px;
}
}

@media screen and ( min-width: 640px ) {
pre {
tab-size: 16px;
}
}

@media screen and ( min-width: 1280px ) {
pre {
tab-size: 32px;
}
}
</pre>
<p>A working example of <a href="../../working-examples/reflow-indenting.html">code snippets using CSS to modigy indentation width at different breakpoints</a>.
</section>
</section>

<section id="tests">
<h2>Tests</h2>
<section class="procedure"><h3>Procedure for list example</h3>
<ol>
<li>Display the web page in a user agent where the page can be zoomed, or the user agent can be resized.</li>
<li>Zoom in or resize the browser window so that the viewport is equivallent to 320 CSS pixels wide.</li>
<li>The list content fits within the width so that it is only necessary so scroll vertically to read the list.</li>
<li>Or, each nested list can be horizontally scrolled into view. Only vertical scrolling is necessary to read the content of list items within each specific nested list level.</li>
</ol>
</section>
<section class="results"><h3>Expected Results</h3>
<ul>
<li>Checks 3 or 4 are true.</li>
</ul>
</section>

<section class="procedure"><h3>Procedure for code snippets</h3>
<ol>
<li>Display the web page in a user agent where the page can be zoomed, or the user agent can be resized.</li>
<li>Zoom in or resize the browser window so that the viewport is equivallent to 320 CSS pixels wide.</li>
<li>The code snippets fits within the width so that it is only necessary so scroll vertically to read each line of code.</li>
<li>Or, for code where non-wrapping lines are not essential, the code wraps or a mechanism is provided to allow line wrapping.</li>
<li>Or, the indentation and linebreaks are meaningful to the code language.
</ol>
</section>
<section class="results"><h3>Expected Results</h3>
<ul>
<li>Checks #3, #4 or #5 are true.</li>
</ul>
</section>
</section>
<section id="related">
<h2>Related Techniques</h2>
<ul>
<li><a href="../css/C20">C20</a></li>
</ul>
</section>
</body>
</html>
63 changes: 63 additions & 0 deletions techniques/general/g302.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!DOCTYPE html>
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Section panels that scroll horizontally are designed to fit within a width of 320 CSS pixels on a vertically scrolling page</title>
<link rel="stylesheet" type="text/css" href="../../css/sources.css" class="remove"/>
</head>
<body>
<h1>Section panels that scroll horizontally are designed to fit within a width of 320 CSS pixels on a vertically scrolling page</h1>
<section class="meta">
<p class="id">ID: </p>
<p class="technology">Technology: general</p>
<p class="type">Type: Technique</p>
</section>
<section id="applicability">
<h2>When to Use</h2>
<p>All technologies.</p>
</section>
<section id="description">
<h2>Description</h2>
<p>The objective of this technique is to ensure that users can zoom in on text within a horizontally scrolling section, while not requiring horizontal scrolling to read the content of each individual panel. Although the entire section requires horizontal scrolling to navigate between panels, each panel is designed to fit within a fixed width of 320 CSS pixels. This ensures that when a 320 CSS pixel wide viewport is used, and the card is in the viewport, each card will remain fully visible without the need for additional horizontal scrolling to read its content.</p>
</section>
<section id="examples">
<h2>Examples</h2>
<section class="example">
<h3>A product carousel</h3>
<p>The homepage of an online retail website includes several informational sections, some of which feature carousels showcasing highlighted products. These carousels require horizontal scrolling and have a computed height greater than 256 CSS pixels. Each panel is 320 CSS pixels wide, allowing users to see the full width of the card without horizontal scrolling. Consequently, users only need to scroll vertically to view the entire card, ensuring compliance with success criterion 1.4.10 Reflow for that section.</p>
<p>Working example: <a href="../../working-examples/reflow-carousel-panel-horizontal-scroll/">Carousel panels that scroll horizontally are designed to fit within a width of 320 CSS pixels on a vertically scrolling page</a>.
</section>
</section>
<section id="tests">
<h2>Tests</h2>
<section class="procedure">
<h3>Procedure</h3>
<ol>
<li>Check that the layout includes sections of content that scroll horizontally within a vertically scrolling page.</li>
<li>Check that each horizontally scrolling section is divided into distinct panels.</li>
<li>Open the webpage in a user agent that supports 400% zoom, setting the viewport dimensions to 1280 CSS pixels in width.</li>
<li>Activate the zoom function to enlarge the view by 400%.</li>
<li>Check that the content of each individual panel within the horizontally scrolling sections is fully readable without the need for additional horizontal scrolling.</li>
</ol>
<div class="note">
<p class="note-title marker">Note</p>
<div>
<p>The native browser scrollbar is not included in the viewport dimensions. Therefore, when setting the view to 1280 CSS pixels wide for a vertically scrolling page, make sure to exclude the scrollbar width.</p>
</div>
</div>
</section>
<section class="results">
<h3>Expected Results</h3>
<ul>
<li>All checks above are true.</li>
</ul>
</section>
</section>
<section id="related">
<h2>Related Techniques</h2>
<ul>
<li><a href="../general/G206">G206</a></li>
<li><a href="../client-side-script/SCR34">SCR34</a></li>
</ul>
</section>
</body>
</html>
Binary file added understanding/21/img/carousel-large-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/code-diff.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/max-width-video.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/news-large-screen.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/news-reflow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/reflow-no-sticky-ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/reflow-sticky-ad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/single-carousel-panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added understanding/21/img/table-exception.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading