657 lines
24 KiB
HTML
657 lines
24 KiB
HTML
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.15/css/dataTables.bootstrap4.min.css"/>
|
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css" integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb" crossorigin="anonymous">
|
|
<style>
|
|
/* general */
|
|
body {
|
|
margin: 3em;
|
|
}
|
|
.tab-content {
|
|
margin-top: 2em;
|
|
}
|
|
|
|
table th {
|
|
width: auto !important;
|
|
}
|
|
code {
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.location {
|
|
font-size:.8em;font-family:monospace;overflow-wrap:break-word
|
|
}
|
|
|
|
.snippet {
|
|
font-size:.8em;
|
|
}
|
|
.snippet code {
|
|
display: block;
|
|
font-size:1em;
|
|
font-family:monospace;overflow-wrap:break-word;
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.tab-pane{
|
|
margin-top: 1.5em;
|
|
margin-left: 1em;
|
|
margin-bottom: 2em; /* useful for javascriptless (tab-less) linear display mode */
|
|
}
|
|
|
|
.pagenav {
|
|
font-style: italic;
|
|
font-size: small;
|
|
margin-top: 1em;
|
|
}
|
|
|
|
.sectionnav {
|
|
font-style: italic;
|
|
font-size: small;
|
|
margin-top: 1em;
|
|
margin-bottom: 2em;
|
|
}
|
|
/* metadata */
|
|
#metadata-table tr td:first-child {
|
|
font-family: 'Courier New';
|
|
font-weight: bold;
|
|
}
|
|
.metadata-name {
|
|
font-family: 'Courier New';
|
|
font-weight: bold;
|
|
}
|
|
.metadata-name:after {
|
|
content: ", ";
|
|
}
|
|
.metadata-name:last-child::after {
|
|
content: "";
|
|
}
|
|
#a11y-metadata {
|
|
margin-top: 1em;
|
|
}
|
|
#metadata-table_wrapper {
|
|
padding-left: 0 !important;
|
|
}
|
|
|
|
/* TOC outline */
|
|
.toc-h1:before,.toc-h2:before,.toc-h3:before,.toc-h4:before,.toc-h5:before,.toc-h6:before,.toc-missing{
|
|
display:inline-block;
|
|
height:1.5em;
|
|
padding:0 .4em;
|
|
background-color:#449d44;
|
|
border-radius:4px;
|
|
color:#fff;
|
|
font-size:.8em;
|
|
font-family:monospace;
|
|
margin:0 .5em 0 0;
|
|
}
|
|
|
|
.toc-h1:before{content:'h1'}
|
|
.toc-h2:before{content:'h2'}
|
|
.toc-h3:before{content:'h3'}
|
|
.toc-h4:before{content:'h4'}
|
|
.toc-h5:before{content:'h5'}
|
|
.toc-h6:before{content:'h6'}
|
|
.toc-missing{font-family:inherit;background-color:#c9302c}
|
|
|
|
#toc-outline ol, #html-outline ol {
|
|
list-style: disc;
|
|
}
|
|
|
|
/* images */
|
|
#images td {
|
|
text-align: center;
|
|
font-family: serif;
|
|
}
|
|
#images td.image{
|
|
/*text-align:center;*/
|
|
padding:.2em;
|
|
}
|
|
#images td.missing{
|
|
/*text-align:center;*/
|
|
color:#888;
|
|
font-style:italic;
|
|
}
|
|
#images td.alt {border:1px solid #ddd}
|
|
#images td.alt.missing{background-color:#f2dede}
|
|
#images td.alt,td.image.presentation+td.alt.missing{background-color:#dff0d8}
|
|
#images img {
|
|
max-height: 300px;
|
|
max-width: 300px;
|
|
}
|
|
|
|
/* violations */
|
|
#violations-summary-stats-table {
|
|
width: 30%;
|
|
}
|
|
#violations ul:not(.pagination) {
|
|
list-style-type: circle;
|
|
}
|
|
|
|
#filters select {
|
|
margin-left: 10px;
|
|
margin-right: 30px;
|
|
}
|
|
|
|
.filter-label {
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.engine {
|
|
font-style: italic;
|
|
}
|
|
.engine:before{content: '(via '}
|
|
.engine:after{content: ')'}
|
|
.css:before{content: 'CSS: '}
|
|
.cfi:before{content: 'CFI: '}
|
|
|
|
/* make the list and KB link the same padding */
|
|
td.details p{
|
|
padding-left: 40px;
|
|
}
|
|
|
|
span.critical, span.serious, span.moderate, span.minor {
|
|
display:inline-block;
|
|
height:1.5em;
|
|
padding: .4em;
|
|
border-radius:4px;
|
|
font-family:monospace;
|
|
font-weight: bold;
|
|
}
|
|
|
|
span.critical {
|
|
background-color: #9c2b2e;
|
|
color: #fff;
|
|
}
|
|
span.serious {
|
|
background-color: #ffa500;
|
|
color: #000;
|
|
}
|
|
span.moderate {
|
|
background-color: #7b5000;
|
|
color: #fff;
|
|
}
|
|
span.minor {
|
|
background-color: #ffff7f;
|
|
color: #000;
|
|
}
|
|
#message {
|
|
margin-left: 1em;
|
|
}
|
|
#violations-table_wrapper {
|
|
padding-left: 0 !important;
|
|
}
|
|
|
|
</style>
|
|
|
|
<title>EPUB Accessibility Report by DAISY Ace</title>
|
|
</head>
|
|
<body>
|
|
|
|
<header>
|
|
<noscript>
|
|
<div class="alert alert-info">Please enable javascript for best performance.</div>
|
|
</noscript>
|
|
|
|
<h1>EPUB Accessibility Report</h1>
|
|
<p class="font-italic">Generated by
|
|
DAISY Ace
|
|
(1.0.1)
|
|
on
|
|
27/11/2019 11:51:44
|
|
</p>
|
|
<p><span class="font-weight-bold">Title:</span> El creador y lo creado</p>
|
|
</header>
|
|
|
|
<nav>
|
|
<ul id="navlist" role="tablist">
|
|
<li class="nav-item"><a class="nav-link active" data-toggle="list" href="#violations" role="tab" aria-controls="Violations" id="nav-violations">Violations</a></li>
|
|
<li class="nav-item"><a class="nav-link" data-toggle="list" href="#metadata" role="tab" aria-controls="Metadata" id="nav-metadata">Metadata</a></li>
|
|
<li class="nav-item"><a class="nav-link" data-toggle="list" href="#outlines" role="tab" aria-controls="Outlines" id="nav-outlines">Outlines</a></li>
|
|
<li class="nav-item"><a class="nav-link" data-toggle="list" href="#images" role="tab" aria-controls="Images" id="nav-images">Images</a></li>
|
|
</ul>
|
|
</nav>
|
|
|
|
|
|
<!-- Tab panes -->
|
|
<div class="tab-content">
|
|
|
|
<!-- VIOLATIONS TAB -->
|
|
<div id="violations" role="tabpanel">
|
|
<h2>Violations</h2>
|
|
<p class="sectionnav">Go to <a href="#summary_of_violations">Summary of Violations</a> | <a href="#violations">All Violations</a> </p>
|
|
|
|
<h3 id="summary_of_violations">Summary of violations</h3>
|
|
<table id="violations-summary-stats-table" class="table table-striped">
|
|
<caption>Violation count, by ruleset and severity.</caption>
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th></th>
|
|
<th scope="col">Critical</th>
|
|
<th scope="col">Serious</th>
|
|
<th scope="col">Moderate</th>
|
|
<th scope="col">Minor</th>
|
|
<th scope="col">Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<th scope="row">WCAG 2.0 A</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">WCAG 2.0 AA</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">EPUB</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Best Practice</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Other</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
<tr>
|
|
<th scope="row">Total</th>
|
|
<td>0</td><td>0</td><td>0</td><td>0</td><td>0</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3 id="violations">All Violations</h3>
|
|
|
|
<div id="filters" class="d-none py-4">
|
|
<span class="filter-label">impact</span>
|
|
<select name="impact" aria-label="impact">
|
|
<option value="all" selected>All</option>
|
|
|
|
</select>
|
|
<span class="filter-label">ruleset</span>
|
|
<select name="ruleset" aria-label="ruleset">
|
|
<option value="all" selected>All</option>
|
|
|
|
</select>
|
|
<span class="filter-label">rule</span>
|
|
<select name="rule" aria-label="rule">
|
|
<option value="all" selected>All</option>
|
|
|
|
</select>
|
|
<span class="filter-label">file</span>
|
|
<select name="file" aria-label="file">
|
|
<option value="all" selected>All</option>
|
|
|
|
</select>
|
|
<a href="#" onclick="resetFilters()" class="ml-4">Reset filters</a>
|
|
</div>
|
|
|
|
<table id="violations-table" class="table table-bordered">
|
|
<caption>Violations in the EPUB, with references to severity, guidelines and specific location of problem.</caption>
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th>Impact</th>
|
|
<th>Ruleset</th>
|
|
<th>Rule</th>
|
|
<th>Location</th>
|
|
<th>Details</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<p class="pagenav">Go to <a href="#violations">Top of section</a> | <a href="#navlist">Page navigation</a></p>
|
|
</div>
|
|
|
|
<!-- METADATA TAB -->
|
|
<div id="metadata" role="tabpanel">
|
|
<h2>Metadata</h2>
|
|
|
|
<p class="sectionnav">Go to <a href="#all-metadata">All Metadata</a> | <a href="#a11y-metadata">Accessibility Metadata</a> </p>
|
|
|
|
<h3 id="all-metadata">All Metadata</h3>
|
|
<table id="metadata-table" class="table table-bordered">
|
|
<caption>Publication metadata.</caption>
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th>Name</th>
|
|
<th>Value</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>dc:language</td>
|
|
<td>es</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:title</td>
|
|
<td>El creador y lo creado</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:creator</td>
|
|
<td>Santa Ana Anguiano, Ramiro</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:publisher</td>
|
|
<td>UNAM-FFyL</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:description</td>
|
|
<td>Tesis para la obtención del grado de Maestro en Filosofía.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:subject</td>
|
|
<td>Filosofía,Filosofía de la cultura,Propiedad intelectual,Bienes comunes</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dc:identifier</td>
|
|
<td>1_0_0-de9325bd5a2840899dd7d11178d0fe9a</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessibilitySummary</td>
|
|
<td>Este EPUB está optimizado para personas con deficiencias visuales; cualquier observación por favor póngase en contacto.</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessMode</td>
|
|
<td>textual,visual</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessModeSufficient</td>
|
|
<td>textual, visual,textual</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessibilityFeature</td>
|
|
<td>structuralNavigation,alternativeText,resizeText</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessibilityAPI</td>
|
|
<td>ARIA</td>
|
|
</tr>
|
|
<tr>
|
|
<td>schema:accessibilityHazard</td>
|
|
<td>none</td>
|
|
</tr>
|
|
<tr>
|
|
<td>dcterms:modified</td>
|
|
<td>2019-11-27T11:51:03Z</td>
|
|
</tr>
|
|
<tr>
|
|
<td>rendition:layout</td>
|
|
<td>reflowable</td>
|
|
</tr>
|
|
<tr>
|
|
<td>ibooks:specified-fonts</td>
|
|
<td>true</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<h3 id="a11y-metadata">Accessibility Metadata</h3>
|
|
|
|
<p>The following accessibility metadata is present:
|
|
<span class="metadata-name">schema:accessMode</span>
|
|
<span class="metadata-name">schema:accessibilityFeature</span>
|
|
<span class="metadata-name">schema:accessibilityHazard</span>
|
|
<span class="metadata-name">schema:accessibilitySummary</span>
|
|
<span class="metadata-name">schema:accessModeSufficient</span>
|
|
<span class="metadata-name">schema:accessibilityAPI</span>
|
|
</p>
|
|
|
|
<p>The following accessibility metadata is missing:
|
|
<span class="metadata-name">schema:accessibilityControl</span>
|
|
<span class="metadata-name">a11y:certifiedBy</span>
|
|
<span class="metadata-name">dcterms:conformsTo</span>
|
|
.
|
|
</p>
|
|
<p class="pagenav">Go to <a href="#metadata">Top of section</a> | <a href="#navlist">Page navigation</a></p>
|
|
</div>
|
|
|
|
<!-- OUTLINES TAB -->
|
|
<div id="outlines" role="tabpanel">
|
|
<h2>Outlines</h2>
|
|
<p class="sectionnav">Go to <a href="#toc-outline">TOC Outline</a> | <a href="#headings-outline">Headings Outline</a> | <a href="#html-outline">HTML Outline</a> </p>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-sm" id="toc-outline">
|
|
<h3>EPUB Table of Contents</h3>
|
|
<ol xmlns="http://www.w3.org/1999/xhtml">
|
|
<li>Portada</li>
|
|
<li>Agradecimientos</li>
|
|
<li>Lista de siglas y acrónimos</li>
|
|
<li>Introducción. Un tema filosófico desatendido</li>
|
|
<li>Teorías de la propiedad intelectual</li>
|
|
<li>Críticas de los bienes comunes</li>
|
|
<li>Puntos de encuentro</li>
|
|
<li>Conclusión. Temas a explorar</li>
|
|
<li>Bibliografía</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<div class="col-sm" id="headings-outline">
|
|
<h3>Headings outline</h3>
|
|
<ul><li><span class="toc-h1">El creador y lo creado</span><li><span class="toc-h1">Agradecimientos</span><li><span class="toc-h1">Lista de siglas y acrónimos</span><li><span class="toc-h1">Introducción. Un tema filosófico desatendido</span><ul><li><span class="toc-h2">Estructura de la investigación</span><li><span class="toc-h2">Tipos de propiedad intelectual</span></li></ul></li><li><span class="toc-h1">Teorías de la propiedad intelectual</span><ul><li><span class="toc-h2">1. En la búsqueda de una definición</span><li><span class="toc-h2">2. En la búsqueda de una teoría</span><li><span class="toc-h2">3. La teoría progresista: el utilitarismo de la legislación estadunidense</span><li><span class="toc-h2">4. La teoría personalista: Hegel, Kant y ¿más Hegel?</span><li><span class="toc-h2">5. La teoría laborista: la defensa de la propiedad de Locke</span><li><span class="toc-h2">6. La posibilidad de una teoría</span></li></ul></li><li><span class="toc-h1">Críticas de los bienes comunes</span><ul><li><span class="toc-h2">7. El familiar incómodo</span><li><span class="toc-h2">8. El resurgimiento: el software libre</span><li><span class="toc-h2">9. La bifurcación: el código abierto</span><li><span class="toc-h2">10. La amplificación: la cultura libre y el acceso abierto</span><li><span class="toc-h2">11. La crítica interna: el copyfarleft</span><li><span class="toc-h2">12. En la búsqueda de una definición</span></li></ul></li><li><span class="toc-h1">Puntos de encuentro</span><ul><li><span class="toc-h2">13. Del problema de la interpretación al de la teorización</span><li><span class="toc-h2">14. El pacto para una alianza ¿tripartita?</span><li><span class="toc-h2">15. El surgimiento de las esferas del distribuidor y del público</span><li><span class="toc-h2">16. El surgimiento, la transferencia y la individuación de la esfera del creador</span><li><span class="toc-h2">17. La implosión de las esferas</span><li><span class="toc-h2">18. Una teoría común de la producción cultural</span></li></ul></li><li><span class="toc-h1">Conclusión. Temas a explorar</span><li><span class="toc-h1">Bibliografía</span></li></ul>
|
|
</div>
|
|
|
|
<div class="col-sm" id="html-outline">
|
|
<h3>HTML outline</h3>
|
|
<ol><li><ol><li><i>Untitled BODY</i><ol><li><i>Untitled SECTION</i></li></ol></li></ol></li><li><ol><li><i>Untitled BODY</i><ol><li>El creador y lo creado</li></ol></li></ol></li><li><ol><li><i>Untitled BODY</i><ol><li><i>Untitled SECTION</i></li></ol></li></ol></li><li><ol><li>Agradecimientos</li></ol></li><li><ol><li>Lista de siglas y acrónimos</li></ol></li><li><ol><li>Introducción. Un tema filosófico desatendido<ol><li>Estructura de la investigación</li><li>Tipos de propiedad intelectual</li></ol></li></ol></li><li><ol><li>Teorías de la propiedad intelectual<ol><li>1. En la búsqueda de una definición</li><li>2. En la búsqueda de una teoría</li><li>3. La teoría progresista: el utilitarismo de la legislación estadunidense</li><li>4. La teoría personalista: Hegel, Kant y ¿más Hegel?</li><li>5. La teoría laborista: la defensa de la propiedad de Locke</li><li>6. La posibilidad de una teoría</li></ol></li></ol></li><li><ol><li>Críticas de los bienes comunes<ol><li>7. El familiar incómodo</li><li>8. El resurgimiento: el software libre</li><li>9. La bifurcación: el código abierto</li><li>10. La amplificación: la cultura libre y el acceso abierto</li><li>11. La crítica interna: el copyfarleft</li><li>12. En la búsqueda de una definición</li></ol></li></ol></li><li><ol><li>Puntos de encuentro<ol><li>13. Del problema de la interpretación al de la teorización</li><li>14. El pacto para una alianza ¿tripartita?</li><li>15. El surgimiento de las esferas del distribuidor y del público</li><li>16. El surgimiento, la transferencia y la individuación de la esfera del creador</li><li>17. La implosión de las esferas</li><li>18. Una teoría común de la producción cultural</li></ol></li></ol></li><li><ol><li>Conclusión. Temas a explorar</li></ol></li><li><ol><li>Bibliografía</li></ol></li><li><ol><li><i>Untitled BODY</i><ol><li><i>Untitled SECTION</i></li></ol></li></ol></li></ol>
|
|
</div>
|
|
</div>
|
|
<p class="pagenav">Go to <a href="#outlines">Top of section</a> | <a href="#navlist">Page navigation</a></p>
|
|
</div>
|
|
|
|
<!-- IMAGES TAB -->
|
|
<div id="images" role="tabpanel">
|
|
<h2>Images</h2>
|
|
<table id="image-table" class="table table-striped table-bordered">
|
|
<caption>Images in the EPUB, with their description</caption>
|
|
<thead class="thead-inverse">
|
|
<tr>
|
|
<th>Image</th>
|
|
<th><code>alt</code> attribute
|
|
</th>
|
|
<th><code>aria-describedby</code> content
|
|
</th>
|
|
<th>Associated <code>figcaption</code></th>
|
|
<th>Location</th>
|
|
<th>Role</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td class="image">
|
|
<a href="data/OPS/img/portada.png">
|
|
<img src = "data/OPS/img/portada.png"/>
|
|
</a>
|
|
</td>
|
|
|
|
<td>Imagen de portada</td>
|
|
|
|
<td class="missing">N/A</td>
|
|
|
|
<td class="missing">N/A</td>
|
|
|
|
<td class="location">xhtml/000-portada.xhtml#epubcfi(/4/2/2[cover-image])</td>
|
|
|
|
<td class="missing">N/A</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p class="pagenav">Go to <a href="#images">Top of section</a> | <a href="#navlist">Page navigation</a></p>
|
|
</div>
|
|
|
|
</div> <!-- end div for tabs' contents -->
|
|
|
|
|
|
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js" integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh" crossorigin="anonymous"></script>
|
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js" integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ" crossorigin="anonymous"></script>
|
|
<script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/jquery.dataTables.min.js"></script>
|
|
<script type="text/javascript" src="https://cdn.datatables.net/1.10.15/js/dataTables.bootstrap4.min.js"></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
// keep a flat list of the violations in memory for table filtering
|
|
var violations = [];
|
|
|
|
// update the contents of the table to reflec the filtering
|
|
function updateTableContents(violationSubset) {
|
|
// anything else is 'other'
|
|
var rulesetTagLabels = {
|
|
'wcag2a': 'WCAG 2.0 A',
|
|
'wcag2aa': 'WCAG 2.0 AA',
|
|
'EPUB': 'EPUB',
|
|
'best-practice': 'Best Practice',
|
|
'other': 'Other'
|
|
};
|
|
|
|
$('#violations-table').dataTable().fnDestroy();
|
|
$("#message").remove();
|
|
if (violationSubset.length == 0) {
|
|
$("<p id='message'>No matching violations found.</p>").insertBefore("#violations .pagenav");
|
|
$("#violations-table").hide();
|
|
return;
|
|
}
|
|
|
|
$("#violations-table").show();
|
|
$("#filters").show();
|
|
|
|
var tablebody = $("#violations-table > tbody");
|
|
tablebody.empty();
|
|
|
|
violationSubset.forEach(function(violation) {
|
|
|
|
var tr = $("<tr></tr>");
|
|
var tdImpact = $("<td><span class='" + violation["impact"] + "'>" + violation["impact"] + "</span></td>");
|
|
var tdRuleset = $("<td><span class='ruleset'>" + rulesetTagLabels[violation["applicableRulesetTag"]] + "</span></td>");
|
|
var tdLocation = $("<td><em>\"" + violation["fileTitle"] + "\"</em><br/><br/><code class='location'>" + violation["location"] + "</code></td>");
|
|
if (violation.html) {
|
|
var tdSnippet = $("<br/><br/><div class='snippet'>Snippet:<code>"+ violation.html.trim() + "</code></div>");
|
|
tdLocation.append(tdSnippet);
|
|
}
|
|
var tdRule = $("<td>" + violation["rule"] + "<br/><br/><span class='engine'>" + violation["engine"] + "</span></td>");
|
|
|
|
var desc = violation["desc"];
|
|
desc = desc.replace("Fix all of the following:", "");
|
|
desc = desc.replace("Fix any of the following:", "");
|
|
|
|
var detailsArr = desc.split("\n");
|
|
var tdDetails = $("<td class='details'></td>");
|
|
|
|
var ul = $("<ul></ul>");
|
|
tdDetails.append(ul);
|
|
detailsArr.forEach(function(item) {
|
|
if (item != "") {
|
|
var elm = $("<li></li>");
|
|
elm.text(decodeEntities(item));
|
|
ul.append(elm);
|
|
}
|
|
});
|
|
var link = $("<p><a href='"
|
|
+ violation["kburl"]
|
|
+ "' target='_blank'>Learn more about " + violation["kbtitle"] + "</a></p>");
|
|
tdDetails.append(link);
|
|
|
|
tr.append(tdImpact);
|
|
tr.append(tdRuleset);
|
|
tr.append(tdRule);
|
|
tr.append(tdLocation);
|
|
tr.append(tdDetails);
|
|
tablebody.append(tr);
|
|
});
|
|
|
|
$('#violations-table').DataTable();
|
|
}
|
|
|
|
function filterSelected() {
|
|
var filters = [];
|
|
$("#filters select").each(function(idx, elm) {
|
|
$(elm).children("option").each(function (idx, optElm) {
|
|
if (optElm.selected) {
|
|
filters[elm.name] = optElm.value;
|
|
}
|
|
});
|
|
});
|
|
var filteredData = filterViolations(filters);
|
|
updateTableContents(filteredData, true);
|
|
}
|
|
|
|
// expects:
|
|
// {"rule": "all", "impact": "serious", "file": "p1.xhtml"}
|
|
function filterViolations(filters) {
|
|
var filteredList = [];
|
|
violations.forEach(function(item) {
|
|
if (
|
|
(filters["rule"] == "all" || item["rule"] === filters["rule"])
|
|
&&
|
|
(filters["impact"] == "all" || item["impact"] === filters["impact"])
|
|
&&
|
|
(filters["file"] == "all" || item["file"] === filters["file"])
|
|
&&
|
|
(filters["ruleset"] == "all" || item["applicableRulesetTag"] === filters["ruleset"])
|
|
)
|
|
{
|
|
filteredList.push(item);
|
|
}
|
|
});
|
|
return filteredList;
|
|
}
|
|
|
|
function resetFilters() {
|
|
$("#filters select").each(function(idx, elm) {
|
|
$(elm).children("option").each(function (idx, optElm) {
|
|
optElm.selected = optElm.value == "all";
|
|
});
|
|
});
|
|
filterSelected();
|
|
}
|
|
|
|
function decodeEntities(text) {
|
|
// The entities tend to appear in violation descriptions, and there are just a few named ones involved
|
|
var namedEntities = {
|
|
"<": "<",
|
|
">": ">",
|
|
""": "\"",
|
|
" ": " "
|
|
};
|
|
// process entities
|
|
var str = text.replace(/&#(\d+);/g, function(match, dec) {
|
|
return String.fromCharCode(dec);
|
|
});
|
|
|
|
//process named entities
|
|
Object.keys(namedEntities).forEach(k => {
|
|
str = str.replace(new RegExp(k, 'g'), namedEntities[k]);
|
|
});
|
|
return str;
|
|
}
|
|
|
|
// certain classes need to be added to elements if we're using javascript in the browser
|
|
function prepareForJS() {
|
|
$('#filters').removeClass('d-none');
|
|
$('#navlist').addClass('nav-tabs nav');
|
|
$('#violations').addClass('tab-pane active');
|
|
$('#metadata').addClass('tab-pane');
|
|
$('#outlines').addClass('tab-pane');
|
|
$('#images').addClass('tab-pane');
|
|
}
|
|
$(document).ready(function() {
|
|
prepareForJS();
|
|
$('#metadata-table').DataTable();
|
|
//updateTableContents(violations, false);
|
|
$('#violations-table').DataTable();
|
|
$('#filters > select').change(filterSelected);
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
</body>
|
|
</html>
|