Skip to content

Commit

Permalink
Content - Merge pull request #2115 from shiva-sc/list
Browse files Browse the repository at this point in the history
WCAG upgrade -- add a test page for helper lists

Content - List utilities - Working examples
  • Loading branch information
duboisp authored Mar 22, 2023
2 parents 3972eea + 84830eb commit dd8ad69
Show file tree
Hide file tree
Showing 5 changed files with 1,155 additions and 0 deletions.
45 changes: 45 additions & 0 deletions common/list/index.json-ld
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"@context": {
"@version": 1.1,
"dct": "http://purl.org/dc/terms/",
"title": { "@id": "dct:title", "@container": "@language" },
"description": { "@id": "dct:description", "@container": "@language" },
"modified": "dct:modified"
},
"title": {
"en": "List",
"fr": "Listes"
},
"description": {
"en": "Example of all the possible styled list variant",
"fr": "Example de toutes les possibles variantes de personnalisation de liste."
},
"modified": "2023-03-05",
"componentName": "list",
"processing": "baseline",
"status": "stable",
"pages": {
"examples": [
{
"title": "Lists",
"language": "en",
"path": "lists-en.html"
},
{
"title": "Listes",
"language": "fr",
"path": "lists-fr.html"
},
{
"title": "List group",
"language": "en",
"path": "list-group-en.html"
},
{
"title": "Liste groupé",
"language": "fr",
"path": "list-group-fr.html"
}
]
}
}
167 changes: 167 additions & 0 deletions common/list/list-group-en.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
---
{
"title": "List group",
"language": "en",
"altLangPage": "list-group-fr.html",
"breadcrumbs": [
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" }
],
"dateModified": "2023-03-05"
}
---

<div class="wb-prettify all-pre"></div>
<h2>Basic use: Default</h2>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item">Text</li>
<li class="list-group-item">Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item">Link text</a>
<a href="#" class="list-group-item active">Link text (active item)</a>
<a href="#" class="list-group-item">Link text</a>
</div>
<h3>Code</h3>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item"&gt;Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;Link text&lt;/a&gt;
&lt;/div&gt;</code></pre>

<h2>Enhanced use</h2>
<h3>Colours</h3>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item list-group-item-success">Text</li>
<li class="list-group-item list-group-item-info">Text</li>
<li class="list-group-item list-group-item-warning">Text</li>
<li class="list-group-item list-group-item-danger">Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success">Link text</a>
<a href="#" class="list-group-item list-group-item-info">Link text</a>
<a href="#" class="list-group-item list-group-item-warning">Link text</a>
<a href="#" class="list-group-item list-group-item-danger">Link text</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-info active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-warning active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-danger active">Link text (active item)</a>
</div>
<h4>Code</h4>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item list-group-item-success"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-info"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-warning"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-danger"&gt;Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item list-group-item-success"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-info"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-warning"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-danger"&gt;Link text&lt;/a&gt;
&lt;/div&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item list-group-item-success active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-info active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-warning active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-danger active"&gt;Link text (active item)&lt;/a&gt;
&lt;/div&gt;</code></pre>

<h3>Badges</h3>
<div class="panel-body">
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item"><span class="badge">14</span> Text</li>
<li class="list-group-item"><span class="badge">2</span> Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item"><span class="badge">14</span> Link text</a>
<a href="#" class="list-group-item active"><span class="badge">2</span> Link text (active item)</a>
<a href="#" class="list-group-item"><span class="badge">5</span> Link text</a>
</div>
</div>
<h4>Code</h4>
<pre><code>&lt;div class="panel-body"&gt;
&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;&lt;span class="badge"&gt;14&lt;/span&gt; Text&lt;/li&gt;
&lt;li class="list-group-item"&gt;&lt;span class="badge"&gt;2&lt;/span&gt; Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;&lt;span class="badge"&gt;14&lt;/span&gt; Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;&lt;span class="badge"&gt;2&lt;/span&gt; Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;&lt;span class="badge"&gt;5&lt;/span&gt; Link text&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;</code></pre>

<h3>Complex content </h3>
<p> The following content are not compliant to accessibility and they are there only for example purpose. <a href="#skipComplexContent">Skip this non-accessible content section.</a></p>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</li>
<li class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
<a href="#" class="list-group-item active">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
<a href="#" class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
</div>
<h4>Code</h4>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/li&gt;
&lt;li class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;/div&gt;</code></pre>
<div id="skipComplexContent"></div>
170 changes: 170 additions & 0 deletions common/list/list-group-fr.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
---
{
"title": "Liste groupé",
"language": "fr",
"altLangPage": "list-group-en.html",
"breadcrumbs": [
{ "title": "GCWeb home", "link": "https://wet-boew.github.io/GCWeb/index-fr.html" }
],
"dateModified": "2023-03-05"
}
---

<div class="wb-prettify all-pre"></div>
<p>Cette page nécessite une traduction.</p>
<div lang="en">
<h2>Basic use: Default</h2>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item">Text</li>
<li class="list-group-item">Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item">Link text</a>
<a href="#" class="list-group-item active">Link text (active item)</a>
<a href="#" class="list-group-item">Link text</a>
</div>
<h3>Code</h3>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item"&gt;Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;Link text&lt;/a&gt;
&lt;/div&gt;</code></pre>

<h2>Enhanced use</h2>
<h3>Colours</h3>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item list-group-item-success">Text</li>
<li class="list-group-item list-group-item-info">Text</li>
<li class="list-group-item list-group-item-warning">Text</li>
<li class="list-group-item list-group-item-danger">Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success">Link text</a>
<a href="#" class="list-group-item list-group-item-info">Link text</a>
<a href="#" class="list-group-item list-group-item-warning">Link text</a>
<a href="#" class="list-group-item list-group-item-danger">Link text</a>
</div>
<div class="list-group">
<a href="#" class="list-group-item list-group-item-success active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-info active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-warning active">Link text (active item)</a>
<a href="#" class="list-group-item list-group-item-danger active">Link text (active item)</a>
</div>
<h4>Code</h4>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item list-group-item-success"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-info"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-warning"&gt;Text&lt;/li&gt;
&lt;li class="list-group-item list-group-item-danger"&gt;Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item list-group-item-success"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-info"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-warning"&gt;Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-danger"&gt;Link text&lt;/a&gt;
&lt;/div&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item list-group-item-success active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-info active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-warning active"&gt;Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item list-group-item-danger active"&gt;Link text (active item)&lt;/a&gt;
&lt;/div&gt;</code></pre>

<h3>Badges</h3>
<div class="panel-body">
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item"><span class="badge">14</span> Text</li>
<li class="list-group-item"><span class="badge">2</span> Text</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item"><span class="badge">14</span> Link text</a>
<a href="#" class="list-group-item active"><span class="badge">2</span> Link text (active item)</a>
<a href="#" class="list-group-item"><span class="badge">5</span> Link text</a>
</div>
</div>
<h4>Code</h4>
<pre><code>&lt;div class="panel-body"&gt;
&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;&lt;span class="badge"&gt;14&lt;/span&gt; Text&lt;/li&gt;
&lt;li class="list-group-item"&gt;&lt;span class="badge"&gt;2&lt;/span&gt; Text&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;&lt;span class="badge"&gt;14&lt;/span&gt; Link text&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;&lt;span class="badge"&gt;2&lt;/span&gt; Link text (active item)&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;&lt;span class="badge"&gt;5&lt;/span&gt; Link text&lt;/a&gt;
&lt;/div&gt;
&lt;/div&gt;</code></pre>

<h3>Complex content </h3>
<p> The following content are not compliant to accessibility and they are there only for example purpose. <a href="#skipComplexContent">Skip this non-accessible content section.</a></p>
<p>No links:</p>
<ul class="list-group">
<li class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</li>
<li class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</li>
</ul>
<p>With links:</p>
<div class="list-group">
<a href="#" class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
<a href="#" class="list-group-item active">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
<a href="#" class="list-group-item">
<h3 class="list-group-item-heading">Heading</h3>
<p class="list-group-item-text">Content</p>
</a>
</div>
<h4>Code</h4>
<pre><code>&lt;p&gt;No links:&lt;/p&gt;
&lt;ul class="list-group"&gt;
&lt;li class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/li&gt;
&lt;li class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;With links:&lt;/p&gt;
&lt;div class="list-group"&gt;
&lt;a href="#" class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;a href="#" class="list-group-item active"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;a href="#" class="list-group-item"&gt;
&lt;h3 class="list-group-item-heading"&gt;Heading&lt;/h3&gt;
&lt;p class="list-group-item-text"&gt;Content&lt;/p&gt;
&lt;/a&gt;
&lt;/div&gt;</code></pre>
<div id="skipComplexContent"></div>
</div>
Loading

0 comments on commit dd8ad69

Please sign in to comment.