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

WCAG-upgrade -- add an example for grouping #2182

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shiva-sc
Copy link
Contributor

@shiva-sc shiva-sc commented Jul 3, 2023

Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

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

Move/add this example with the scaffolding common component. The folder: "/common/scaffolding/"

common/grouping/grouping-en.html Outdated Show resolved Hide resolved
common/grouping/grouping-en.html Outdated Show resolved Hide resolved
common/grouping/grouping-en.html Outdated Show resolved Hide resolved
common/grouping/grouping-en.html Outdated Show resolved Hide resolved
common/grouping/grouping-en.html Outdated Show resolved Hide resolved
Comment on lines 229 to 239
<header>
<h1><a href="/">My fancy blog</a></h1>
...
<search>
<form action="search.php">
<label for="query">Find an article</label>
<input id="query" name="q" type="search">
<button type="submit">Go!</button>
</form>
</search>
</header>
Copy link
Member

Choose a reason for hiding this comment

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

Adjust the example to be more focus on the search element and to avoid issue with multiple h1 and header that are not explicitly in a sectioning element.

Suggested change
<header>
<h1><a href="/">My fancy blog</a></h1>
...
<search>
<form action="search.php">
<label for="query">Find an article</label>
<input id="query" name="q" type="search">
<button type="submit">Go!</button>
</form>
</search>
</header>
<search>
<form action="search.php">
<label for="query">Find an article</label>
<input id="query" name="q" type="search">
<button type="submit">Go!</button>
</form>
</search>

Comment on lines 245 to 249
<div>
<h3>This is a heading in a div element</h3>
<p>This is some text in a div element.</p>
</div>
<pre><code>&lt;div&gt;
Copy link
Member

Choose a reason for hiding this comment

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

Because we do use a lot of div every where, please add the following 2 example:

Multiple div's

<div><div>
<div>
	<h3>This is a heading in a div element</h3>
</div>
<div>
	<p>This is some text in a div element.</p>
</div>
</div></div>

Empty div

<div></div>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@duboisp In the first example there are two div's at the start

Does it need to only one div

<div>
<div>
	<h3>This is a heading in a div element</h3>
</div>
<div>
	<p>This is some text in a div element.</p>
</div>
</div>

Copy link
Member

Choose a reason for hiding this comment

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

Let's keep an example with multiple <div> to show and to ensure that wrapping <div> are always transparent. For example AEM do wrap component with one or more div.

@@ -0,0 +1,256 @@
---
{
"title": "Grouping Content - Scaffolding",
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"title": "Grouping Content - Scaffolding",
"title": "Contenu de groupement - Échafaudage",

"language": "fr",
"altLangPage": "grouping-en.html",
"breadcrumbs": [
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" }
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-en.html" }
{ "title": "GCWeb accueil", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" }


<div lang="en">
<div class="alert alert-warning">
<p>The purpose of this page is to test all native content grouping related elements, if they are aligned with our design and are compliant to our accessibility guideline when used as is without any special customization. The following include all content grouping elements in the HTML5 specification and a few examples was inspired by the <a href="https://html.spec.whatwg.org/multipage/forms.html#forms">WHATWG section 4.4</a> as February 2023. This page may not contain all the possible grouping content element combination.</p>
Copy link
Member

Choose a reason for hiding this comment

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

Comment on lines 28 to 30
<pre><code>
&lt;pre>&lt;code>&lt;p> ... &lt;/p>&lt;/code>&lt;/pre>
</code></pre>
Copy link
Member

Choose a reason for hiding this comment

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

The is no <code> element

Suggested change
<pre><code>
&lt;pre>&lt;code>&lt;p> ... &lt;/p>&lt;/code>&lt;/pre>
</code></pre>
<pre><code>&lt;pre> ... &lt;/pre></code></pre>

Remove the new line \n at line 28 because it do create an empty space when rendered

image

Comment on lines 80 to 123
<h2>The <code>dl</code> element</h2>
<p> In the following example, one entry ("Authors") is linked to two values ("John" and "Luke"). </p>
<dl>
<dt> Authors </dt>
<dd> John </dd>
<dd> Luke </dd>
<dt> Editor </dt>
<dd> Frank </dd>
</dl>

<p> In the following example, one definition is linked to two terms. </p>
<dl>
<dt lang="en-US"> <dfn>color</dfn> </dt>
<dt lang="en-GB"> <dfn>colour</dfn> </dt>
<dd> A sensation which (in humans) derives from the ability of
the fine structure of the eye to distinguish three differently
filtered analyses of a view. </dd>
</dl>

<p> The following example illustrates the use of the dl element to mark up metadata of sorts. At the end of the example, one group has two metadata labels ("Authors" and "Editors") and two values ("Robert Rothman" and "Daniel Jackson"). This example also uses the div element around the groups of dt and dd element, to aid with styling. </p>
<dl>
<div>
<dt> Last modified time </dt>
<dd> 2004-12-23T23:33Z </dd>
</div>
<div>
<dt> Recommended update interval </dt>
<dd> 60s </dd>
</div>
<div>
<dt> Authors </dt>
<dt> Editors </dt>
<dd> Robert Rothman </dd>
<dd> Daniel Jackson </dd>
</div>
</dl>

<p> The following example shows the dl element used to give a set of instructions. The order of the instructions here is important (in the other examples, the order of the blocks was not important). </p>
<p>Determine the victory points as follows (use the
first matching case):</p>
<dl>
<dt> If you have exactly five gold coins </dt>
<dd> You get five victory points </dd>
<dt> If you have one or more gold coins, and you have one or more silver coins </dt>
<dd> You get two victory points </dd>
<dt> If you have one or more silver coins </dt>
<dd> You get one victory point </dd>
<dt> Otherwise </dt>
<dd> You get no victory points </dd>
</dl>

<p> The following snippet shows a dl element being used as a glossary. Note the use of dfn to indicate the word being defined. </p>
<dl>
<dt><dfn>Apartment</dfn>, n.</dt>
<dd>An execution context grouping one or more threads with one or
more COM objects.</dd>
<dt><dfn>Flat</dfn>, n.</dt>
<dd>A deflated tire.</dd>
<dt><dfn>Home</dfn>, n.</dt>
<dd>The user's login directory.</dd>
</dl>
Copy link
Member

Choose a reason for hiding this comment

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

Let's add a few sub-heading to add some clarity,

Currently when rendered it is a little bit confusing
image

I propose:

Suggested change
<h2>The <code>dl</code> element</h2>
<p> In the following example, one entry ("Authors") is linked to two values ("John" and "Luke"). </p>
<dl>
<dt> Authors </dt>
<dd> John </dd>
<dd> Luke </dd>
<dt> Editor </dt>
<dd> Frank </dd>
</dl>
<p> In the following example, one definition is linked to two terms. </p>
<dl>
<dt lang="en-US"> <dfn>color</dfn> </dt>
<dt lang="en-GB"> <dfn>colour</dfn> </dt>
<dd> A sensation which (in humans) derives from the ability of
the fine structure of the eye to distinguish three differently
filtered analyses of a view. </dd>
</dl>
<p> The following example illustrates the use of the dl element to mark up metadata of sorts. At the end of the example, one group has two metadata labels ("Authors" and "Editors") and two values ("Robert Rothman" and "Daniel Jackson"). This example also uses the div element around the groups of dt and dd element, to aid with styling. </p>
<dl>
<div>
<dt> Last modified time </dt>
<dd> 2004-12-23T23:33Z </dd>
</div>
<div>
<dt> Recommended update interval </dt>
<dd> 60s </dd>
</div>
<div>
<dt> Authors </dt>
<dt> Editors </dt>
<dd> Robert Rothman </dd>
<dd> Daniel Jackson </dd>
</div>
</dl>
<p> The following example shows the dl element used to give a set of instructions. The order of the instructions here is important (in the other examples, the order of the blocks was not important). </p>
<p>Determine the victory points as follows (use the
first matching case):</p>
<dl>
<dt> If you have exactly five gold coins </dt>
<dd> You get five victory points </dd>
<dt> If you have one or more gold coins, and you have one or more silver coins </dt>
<dd> You get two victory points </dd>
<dt> If you have one or more silver coins </dt>
<dd> You get one victory point </dd>
<dt> Otherwise </dt>
<dd> You get no victory points </dd>
</dl>
<p> The following snippet shows a dl element being used as a glossary. Note the use of dfn to indicate the word being defined. </p>
<dl>
<dt><dfn>Apartment</dfn>, n.</dt>
<dd>An execution context grouping one or more threads with one or
more COM objects.</dd>
<dt><dfn>Flat</dfn>, n.</dt>
<dd>A deflated tire.</dd>
<dt><dfn>Home</dfn>, n.</dt>
<dd>The user's login directory.</dd>
</dl>
<h2 id="dl-element">The <code>dl</code> element</h2>
<dl>
<dt> Term 1 </dt>
<dd> Description 1 </dd>
<dt> Term 2</dt>
<dd> Description 2 </dd>
</dl>
<h3>With two consecutive description </h3>
<dl>
<dt> Authors </dt>
<dd> John </dd>
<dd> Luke </dd>
<dt> Editor </dt>
<dd> Frank </dd>
</dl>
<h3>With two consecutive term </h3>
<dl>
<dt lang="en-US"> color </dt>
<dt lang="en-GB"> colour </dt>
<dd> A sensation which (in humans) derives from the ability of
the fine structure of the eye to distinguish three differently
filtered analyses of a view. </dd>
</dl>
<h3>With grouping division <code>&lt;div></code></h3>
<dl>
<div>
<dt> Last modified time </dt>
<dd> 2004-12-23T23:33Z </dd>
</div>
<div>
<dt> Recommended update interval </dt>
<dd> 60s </dd>
</div>
<div>
<dt> Authors </dt>
<dt> Editors </dt>
<dd> Robert Rothman </dd>
<dd> Daniel Jackson </dd>
</div>
</dl>
<h3>As glossary with term definition <code>&lt;dfn></code></h3>
<dl>
<dt><dfn>Apartment</dfn>, n.</dt>
<dd>An execution context grouping one or more threads with one or
more COM objects.</dd>
<dt><dfn>Flat</dfn>, n.</dt>
<dd>A deflated tire.</dd>
<dt><dfn>Home</dfn>, n.</dt>
<dd>The user's login directory.</dd>
</dl>
<h2>The <code>dt</code> element</h2>
<p>Demoed with the following element: <a href="#dl-element"><code>dl</code></a></p>
<h2>The <code>dd</code> element</h2>
<p>Demoed with the following element: <a href="#dl-element"><code>dl</code></a></p>

Which will look like this:
image


<h2>The <code>figure</code> element</h2>
<figure>
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
Copy link
Member

Choose a reason for hiding this comment

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

We should avoid inline style and we should link to a real image

  • Please remove the "style" attribute
  • Please change the img source + alt text for an existing image that are hosted in our Github
Suggested change
<img src="pic_trulli.jpg" alt="Trulli" style="width:100%">
<img src="pic_trulli.jpg" alt="Trulli">

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@duboisp : Can you please give an example for existing image source?

Comment on lines 194 to 189
<figure>
<p>'Twas brillig, and the slithy toves<br>
Did gyre and gimble in the wabe;<br>
All mimsy were the borogoves,<br>
And the mome raths outgrabe.</p>
<figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption>
</figure>
Copy link
Member

Choose a reason for hiding this comment

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

Add an example where the figcaption is the first child element

Like:

Suggested change
<figure>
<p>'Twas brillig, and the slithy toves<br>
Did gyre and gimble in the wabe;<br>
All mimsy were the borogoves,<br>
And the mome raths outgrabe.</p>
<figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption>
</figure>
<figure>
<p>'Twas brillig, and the slithy toves<br>
Did gyre and gimble in the wabe;<br>
All mimsy were the borogoves,<br>
And the mome raths outgrabe.</p>
<figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption>
</figure>
<figure>
<figcaption><cite>Jabberwocky</cite> (first verse). Lewis Carroll, 1832-98</figcaption>
<p>'Twas brillig, and the slithy toves<br>
Did gyre and gimble in the wabe;<br>
All mimsy were the borogoves,<br>
And the mome raths outgrabe.</p>
</figure>

Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

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

Forgot to mention this scaffolding example need to be moved along with other scaffolding in the folder "common/scaffolding" and you can simply update the index.json-ld along with the new pages

Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

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

(Incomplete check)

Need to add a reference at those 2 example in the existing index.json-ld file in the scaffolding folder.

@duboisp duboisp added the Query: Project item Part of a github project label Sep 21, 2023
@shiva-sc
Copy link
Contributor Author

@duboisp Pushed my changes

cc: @jonasg-gc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Query: Project item Part of a github project
Projects
Status: For Review
Development

Successfully merging this pull request may close these issues.

2 participants