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 57 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
57 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
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
Binary file added exception-does-not-extend.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
163 changes: 163 additions & 0 deletions techniques/general/g20x.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,163 @@
<!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: G206</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 are instances where indentation of text is considered important to the understandability of the text content. If the indentations were to be removed, then meaning or functionality could suffer. For instance, the nesting of unordered list hierarchies would become more difficult to notice if indentation were removed. Additionally, maintaining indentations can be important to help understand code patterns, if not even necessary for the code to function.</p>
<p>Maintaining indentation is important for these instances of text, and would be considered essential for two-dimensional scrolling if the text were enlarged and could not be fully presented within the available viewport. 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.</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 container.</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 the lists is maintained, but reduced once an author defined CSS breakpoint is met. The container of the text content of each list item is given a maximum width of 320 CSS pixels so that even though the list will require bi-dimensional scrolling to view all nested lists, each list item in each nested list level will be able to be read witout the need to scroll in two directions.</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>
</li>
<li><p>The list marker for each <code>li</code> element is initially based on the parent list element used.</p>
<ul>
<li><p>The list maker can be modified by using CSS,</p></li>
<li><p>or the list marker can be modifed by using the <code>type</code> attribute, if the parent list element is an <code>ol</code> element.</p></li>
</ul>
</li>
</ul>
</li>
<li>
<p>Validate your markup.</p>
</li>
</ul>
</div>
</pre>
<pre>
@media screen and (max-width: 640px) {
.example {
overflow: auto;
max-width: 640px;
}
ul {
padding-inline-start: 1em;
}
li p {
max-width: 320px;
margin: .5em 0;
}
}
</pre>
</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>
</section>
</section>

<section id="tests">
<h2>Tests</h2>
<section class="procedure"><h3>Procedure</h3>
<ol>
<li>Open the content that requires horizontal scrolling on a full screen window. </li>
<li>Zoom in or resize the browser window so that the viewport
</ol>
</section>
<section class="results"><h3>Expected Results</h3>
<ul>
<li>Checks X 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>
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.
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/npr-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/npr-reflow.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-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