Skip to content

Commit

Permalink
[Mobile] force an exception if appium session is not opened (#74)
Browse files Browse the repository at this point in the history
* Accessibility: update to axe core 4.9
* Accessibility: French verison of report
* add support of some language for accessibility test.
* update unit test for multi language.
  • Loading branch information
huaxing-yuan committed Aug 30, 2024
1 parent 4a2fbd5 commit f96aef3
Show file tree
Hide file tree
Showing 24 changed files with 3,383 additions and 79 deletions.
1,123 changes: 1,123 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/axe-core-de.json

Large diffs are not rendered by default.

790 changes: 790 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/axe-core-es.json

Large diffs are not rendered by default.

1,116 changes: 1,116 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/axe-core-zhcn.json

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/node-part.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<button type="button" class="collapsible inner">🔗 {{Selector}}</button>
<div class="content inner" style="display:{{Display}}">
<h3>Html Code</h3>
<h3>${txt-node-html-code}</h3>
<pre><code class="language-html">{{HtmlCode}}</code></pre>
<table>
<tr>
<td width="99%"><h3>Checks performed</h3></td>
<td style="min-width: 350px; white-space: nowrap;"><h3>Screenshot</h3></td>
<td width="99%"><h3>${txt-node-checks-performed}</h3></td>
<td style="min-width: 350px; white-space: nowrap;"><h3>${txt-node-screenshot}</h3></td>
</tr>
<tr>
<td>
Expand All @@ -14,21 +14,21 @@ <h3>Html Code</h3>
<table class="nospace">
<tr>
<td>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'anyChecks-{{UniqueCheckId}}')">ANY</button></div>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'allchecks-{{UniqueCheckId}}')">ALL</button></div>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'nonechecks-{{UniqueCheckId}}')">NONE</button></div>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'anyChecks-{{UniqueCheckId}}')">${txt-node-any}</button></div>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'allchecks-{{UniqueCheckId}}')">${txt-node-none}</button></div>
<div><button class="horizontalLinks" onclick="openHorizontalTab(event, 'nonechecks-{{UniqueCheckId}}')">${txt-node-all}</button></div>
</td>
<td>
<div id="anyChecks-{{UniqueCheckId}}" class="horizontalTabContent">
<H3>Any Checks: Checks where at least one must have passed:</H3>
<H3>${txt-node-any-desc}</H3>
{{AnyChecks}}
</div>
<div id="allchecks-{{UniqueCheckId}}" class="horizontalTabContent">
<h3>All Checks: Checks that were made where all must have passed:</h3>
<h3>${txt-node-none-desc}</h3>
{{AllChecks}}
</div>
<div id="nonechecks-{{UniqueCheckId}}" class="horizontalTabContent">
<h3>None Checks: Checks that were made where all must have not passed:</h3>
<h3>${txt-node-all-desc}</h3>
{{NoneChecks}}
</div>
</td>
Expand All @@ -37,7 +37,7 @@ <h3>None Checks: Checks that were made where all must have not passed:</h3>
</div>
</td>
<td>
<img src="{{Filename}}" alt="Screenshot of checked rules" class="thumbnail" onclick="showCanvas(this)" />
<img src="{{Filename}}" alt="${txt-node-screenshot-alt}" class="thumbnail" onclick="showCanvas(this)" />
</td>
</tr>
</table>
Expand Down
24 changes: 12 additions & 12 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/overall-result.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html lang="${lang}" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>{{Title}}</title>
Expand Down Expand Up @@ -207,7 +207,7 @@
</head>
<body>
<div class="navbar" role="banner">
<div class='donut-container' aria-label="Overall score of the application: {{Score}} percent.">
<div class='donut-container' aria-label="${txt-overall-score-aria-label}">
<div class='donut' role="none">
</div>
<div class="donut-label" role="none">
Expand All @@ -217,20 +217,20 @@
</div>
</div>
<div>
<h1>Accessibility Report: Application {{Title}}</h1>
<h3>Test performed at: {{TimeStamp}}</h3>
<h1>${txt-overall-banner-title}</h1>
<h3>${txt-overall-banner-performed-at}</h3>
</div>
</div>
<article>
<h2>Web pages tested:</h2>
<p id="tblDescPagesTested">Pages tested during the uesr journey testing.</p>
<h2>${txt-overall-pages-tested}</h2>
<p id="tblDescPagesTested">${txt-overall-pages-tested-desc}</p>
<table aria-describedby="tblDescPagesTested">
<thead>
<tr>
<th>Page</th>
<th>Url</th>
<th>Score</th>
<th>Page Report</th>
<th>${txt-overall-page}</th>
<th>${txt-overall-url}</th>
<th>${txt-overall-score}</th>
<th>${txt-overall-page-preort}</th>
</tr>
</thead>
<tbody>
Expand All @@ -239,8 +239,8 @@ <h2>Web pages tested:</h2>
</table>
</article>
<article>
<h2>Axe rules overview:</h2>
<p id="tblDescRulesList">A list of applicable rules and the result on each pages. Last column resumes the overall result for the rule.</p>
<h2>${txt-overall-rules-overview}</h2>
<p id="tblDescRulesList">${txt-overall-rules-overview-desc}</p>
<table aria-describedby="tblDescRulesList">
<thead>
<tr>{{RowPageHeaderList}}</tr>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<td>📄 {{PageTitle}}</td>
<td>🔗 <a href="{{PageUrl}}" target="_blank">{{PageUrl}}</a></td>
<td>
<div class="progressbar">
<div class="progressbar" aria-label="progress {{Score}}%">
<span class="progress" style="width: {{Score}}%; background-color: #{{ScoreColor}}">{{Score}}%</span>
</div>
</td>
<td>📊 <a href="{{ReportLink}}">Page Report</a></td>
<td>📊 <a href="{{ReportLink}}">${txt-overall-page-preort}</a></td>
</tr>
24 changes: 12 additions & 12 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/page-result.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!DOCTYPE html>

<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<html lang="${lang}" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
<title>{{Title}}</title>
Expand Down Expand Up @@ -462,41 +462,41 @@
</div>
</div>
<div>
<h1>Accessibility Report - Page {{Title}}</h1>
<h2>Url: {{PageUrl}}</h2>
<h3>Timestamp: {{TimeStamp}}</h3>
<h1>${txt-page-navbar-title}</h1>
<h2>${txt-page-navbar-url} {{PageUrl}}</h2>
<h3>${txt-page-navbar-timestamp} {{TimeStamp}}</h3>
</div>
</div>

<div class="tab">
<button class="tablinks" id="defaultTab" onclick="openTab(event, 'Violations')">🔴 Violations ({{ViolationRules}})</button>
<button class="tablinks" onclick="openTab(event, 'Incomplete')">🟡 Incomplete ({{IncompleteRules}})</button>
<button class="tablinks" onclick="openTab(event, 'NonApplicable')">Inapplicable ({{NonApplicableRules}})</button>
<button class="tablinks" onclick="openTab(event, 'Passed')">🟢 Passed ({{PassedRules}})</button>
<button class="tablinks" id="defaultTab" onclick="openTab(event, 'Violations')">🔴 ${txt-page-tab-violations} ({{ViolationRules}})</button>
<button class="tablinks" onclick="openTab(event, 'Incomplete')">🟡 ${txt-page-tab-incomplete} ({{IncompleteRules}})</button>
<button class="tablinks" onclick="openTab(event, 'NonApplicable')">${txt-page-tab-inapplicable} ({{NonApplicableRules}})</button>
<button class="tablinks" onclick="openTab(event, 'Passed')">🟢 ${txt-page-tab-passed} ({{PassedRules}})</button>
</div>

<div id="Violations" class="tabcontent">
<h3>Following are {{ViolationRules}} rules having Accessibility issues, with a total of {{ViolationNodes}} occurrences</h3>
<h3>${txt-page-violations-summary}</h3>
<div>
{{Violations}}
</div>
</div>

<div id="Incomplete" class="tabcontent">
<h3>These rules can not be covered by automated testing tool. It is recommanded to conduct an accessbility review on these items.</h3>
<h3>${txt-page-incomplete-summary}</h3>
<div>
{{Incomplete}}
</div>
</div>

<div id="NonApplicable" class="tabcontent">
<h3>These rules are not applicable on the current page.</h3>
<h3>${txt-page-inapplicable-summary}</h3>
<div>
{{NonApplicable}}
</div>
</div>
<div id="Passed" class="tabcontent">
<h3>These rules have been audited as passed.</h3>
<h3>${txt-page-passed-summary}</h3>
<div>
{{Passed}}
</div>
Expand Down
39 changes: 39 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/report-de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"lang": "de",
"txt-overall-score-aria-label": "Gesamtpunktzahl der Anwendung: {{Score}} Prozent.",
"txt-overall-banner-title": "Barrierefreiheitsbericht: Anwendung {{Title}}",
"txt-overall-banner-performed-at": "Test durchgeführt am: {{TimeStamp}}",
"txt-overall-pages-tested": "Getestete Webseiten:",
"txt-overall-pages-tested-desc": "Seiten, die während des Benutzerreise-Tests getestet wurden.",
"txt-overall-page": "Seite",
"txt-overall-url": "URL",
"txt-overall-score": "Punktzahl",
"txt-overall-page-preort": "Seitenbericht",
"txt-overall-rules-overview": "Regelübersicht:",
"txt-overall-rules-overview-desc": "Eine Liste der anwendbaren Regeln und das Ergebnis auf jeder Seite. Die letzte Spalte fasst das Gesamtergebnis für die Regel zusammen.",
"txt-page-navbar-title": "Barrierefreiheitsbericht - Seite {{Title}}",
"txt-page-navbar-url": "URL:",
"txt-page-navbar-timestamp": "Zeitstempel:",
"txt-page-tab-violations": "Verstöße",
"txt-page-tab-incomplete": "Unvollständig",
"txt-page-tab-inapplicable": "Nicht anwendbar",
"txt-page-tab-passed": "Bestanden",
"txt-page-violations-summary": "Nachfolgend sind {{ViolationRules}} Regeln mit Barrierefreiheitsproblemen aufgeführt, mit insgesamt {{ViolationNodes}} Vorkommnissen",
"txt-page-incomplete-summary": "Diese Regeln können nicht durch automatisierte Testwerkzeuge abgedeckt werden. Es wird empfohlen, eine Barrierefreiheitsprüfung für diese Elemente durchzuführen.",
"txt-page-inapplicable-summary": "Diese Regeln sind auf die Seite nicht anwendbar.",
"txt-page-passed-summary": "Diese Regeln wurden als bestanden überprüft.",
"txt-rule-tags": "Tags:",
"txt-rule-id": "Regel-Id:",
"txt-rule-aria-lable": "Tag der Regel-Id: {{RuleId}}",
"txt-rule-link-description": "Link zur Beschreibung:",
"txt-node-html-code": "HTML-Code:",
"txt-node-checks-performed": "Durchgeführte Überprüfungen",
"txt-node-screenshot": "Screenshot",
"txt-node-any": "Beliebig",
"txt-node-any-desc": "Beliebige Überprüfungen: Überprüfungen, bei denen mindestens eine bestanden haben muss:",
"txt-node-none": "Keine",
"txt-node-none-desc": "Keine Überprüfungen: Überprüfungen, bei denen keine bestanden haben dürfen:",
"txt-node-all": "Alle",
"txt-node-all-desc": "Alle Überprüfungen: Überprüfungen, bei denen alle bestanden haben müssen:",
"txt-node-screenshot-alt": "Screenshot der überprüften Regeln"
}
40 changes: 40 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/report-en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"lang": "en",
"txt-overall-score-aria-label": "Overall score of the application: {{Score}} percent.",
"txt-overall-banner-title": "Accessibility Report: Application {{Title}}",
"txt-overall-banner-performed-at": "Test performed at: {{TimeStamp}}",
"txt-overall-pages-tested": "Web pages tested:",
"txt-overall-pages-tested-desc": "Pages tested during the uesr journey testing.",
"txt-overall-page": "Page",
"txt-overall-url": "Url",
"txt-overall-score": "Score",
"txt-overall-page-preort": "Page Report",
"txt-overall-rules-overview": "Rules Overview:",
"txt-overall-rules-overview-desc": "A list of applicable rules and the result on each pages. Last column resumes the overall result for the rule.",
"txt-page-navbar-title": "Accessibility Report - Page {{Title}}",
"txt-page-navbar-url": "Url:",
"txt-page-navbar-timestamp": "Timestamp:",
"txt-page-tab-violations": "Violations",
"txt-page-tab-incomplete": "Incomplete",
"txt-page-tab-inapplicable": "Inapplicable",
"txt-page-tab-passed": "Passed",
"txt-page-violations-summary": "Following are {{ViolationRules}} rules having Accessibility issues, with a total of {{ViolationNodes}} occurrences",
"txt-page-incomplete-summary": "These rules can not be covered by automated testing tool. It is recommanded to conduct an accessbility review on these items.",
"txt-page-inapplicable-summary": "These rules are not applicable to the page.",
"txt-page-passed-summary": "These rules have been audited as passed.",
"txt-rule-tags": "Tags:",
"txt-rule-id": "Rule Id:",
"txt-rule-aria-lable": "Tag of rule id: {{RuleId}}",
"txt-rule-link-description": "Link to the description:",
"txt-node-html-code": "HTML Code:",
"txt-node-checks-performed": "Checks Performed",
"txt-node-screenshot": "Screenshot",
"txt-node-any": "Any",
"txt-node-any-desc": "Any Checks: Checks where at least one must have passed:",
"txt-node-none": "None",
"txt-node-none-desc": "None Checks: Checks where none must have passed:",
"txt-node-all": "All",
"txt-node-all-desc": "All Checks: Checks where all must have passed:",
"txt-node-screenshot-alt": "Screenshot of checked rules"

}
39 changes: 39 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/report-es.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"lang": "es",
"txt-overall-score-aria-label": "Puntuación de la aplicación: {{Score}} por ciento.",
"txt-overall-banner-title": "Informe de accesibilidad: Aplicación {{Title}}",
"txt-overall-banner-performed-at": "Prueba realizada en: {{TimeStamp}}",
"txt-overall-pages-tested": "Páginas web probadas:",
"txt-overall-pages-tested-desc": "Páginas probadas durante las pruebas de la experiencia del usuario.",
"txt-overall-page": "Página",
"txt-overall-url": "URL",
"txt-overall-score": "Puntuación",
"txt-overall-page-preort": "Informe de página",
"txt-overall-rules-overview": "Resumen de reglas:",
"txt-overall-rules-overview-desc": "Una lista de reglas aplicables y el resultado en cada página. La última columna resume el resultado general para la regla.",
"txt-page-navbar-title": "Informe de accesibilidad - Página {{Title}}",
"txt-page-navbar-url": "URL:",
"txt-page-navbar-timestamp": "Marca de tiempo:",
"txt-page-tab-violations": "Infracciones",
"txt-page-tab-incomplete": "Inpleto",
"txt-page-tab-inapplicable": "No aplicable",
"txt-page-tab-passed": "Aprobado",
"txt-page-violations-summary": "A continuación se presentan {{ViolationRules}} reglas con problemas de accesibilidad, con un total de {{ViolationNodes}} ocurrencias",
"txt-page-incomplete-summary": "Estas reglas no pueden ser cubiertas por una herramienta de prueba automatizada. Se recomienda realizar una revisión de accesibilidad de estos elementos.",
"txt-page-inapplicable-summary": "Estas reglas no son aplicables a la página.",
"txt-page-passed-summary": "Estas reglas han sido auditadas como aprobadas.",
"txt-rule-tags": "Etiquetas:",
"txt-rule-id": "Identificación de la regla:",
"txt-rule-aria-lable": "Etiqueta de la identificación de la regla: {{RuleId}}",
"txt-rule-link-description": "Enlace a la descripción:",
"txt-node-html-code": "ódigo HTML:",
"txt-node-checks-performed": "Controles realizados",
"txt-node-screenshot": "Captura de pantalla",
"txt-node-any": "Cualquier",
"txt-node-any-desc": "Controles Cualquier: Controles donde al menos uno debe haber pasado:",
"txt-node-none": "Ninguno",
"txt-node-none-desc": "Controles Ninguno: Controles donde ninguno debe haber pasado:",
"txt-node-all": "Todos",
"txt-node-all-desc": "Controles Todos: Controles donde todos deben haber pasado:",
"txt-node-screenshot-alt": "Captura de pantalla de las reglas verificadas"
}
39 changes: 39 additions & 0 deletions src/AxaFrance.AxeExtended.HtmlReport/Assets/report-fr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"lang": "fr",
"txt-overall-score-aria-label": "Score global de l'application : {{Score}} pour cent.",
"txt-overall-banner-title": "Rapport d'accessibilité : Application {{Title}}",
"txt-overall-banner-performed-at": "Test effectué à : {{TimeStamp}}",
"txt-overall-pages-tested": "Pages web testées :",
"txt-overall-pages-tested-desc": "Pages testées lors du test du parcours utilisateur.",
"txt-overall-page": "Page",
"txt-overall-url": "URL",
"txt-overall-score": "Score",
"txt-overall-page-preort": "Rapport de page",
"txt-overall-rules-overview": "Aperçu des règles :",
"txt-overall-rules-overview-desc": "Une liste des règles applicables et le résultat sur chaque page. La dernière colonne résume le résultat global pour la règle.",
"txt-page-navbar-title": "Rapport d'accessibilité - Page {{Title}}",
"txt-page-navbar-url": "URL :",
"txt-page-navbar-timestamp": "Horodatage :",
"txt-page-tab-violations": "Non Conforme",
"txt-page-tab-incomplete": "Incomplet",
"txt-page-tab-inapplicable": "Non applicable",
"txt-page-tab-passed": "Conforme",
"txt-page-violations-summary": "Les {{ViolationRules}} règles suivantes présentent des problèmes d'accessibilité, avec un total de {{ViolationNodes}} occurrences",
"txt-page-incomplete-summary": "Ces règles ne peuvent pas être couvertes par un outil de test automatisé. Il est recommandé de réaliser un examen d'accessibilité sur ces éléments.",
"txt-page-inapplicable-summary": "Ces règles ne s'appliquent pas à la page.",
"txt-page-passed-summary": "Ces règles ont été vérifiées comme réussies.",
"txt-rule-tags": "Balises :",
"txt-rule-id": "Identifiant de la règle :",
"txt-rule-aria-lable": "Balise de l'identifiant de la règle : {{RuleId}}",
"txt-rule-link-description": "Lien vers la description :",
"txt-node-html-code": "Code HTML :",
"txt-node-checks-performed": "Contrôles effectués",
"txt-node-screenshot": "Capture d'écran",
"txt-node-any": "Tout",
"txt-node-any-desc": "Contrôles Tout : Contrôles où au moins un doit avoir réussi :",
"txt-node-none": "Aucun",
"txt-node-none-desc": "Contrôles Aucun : Contrôles où aucun ne doit avoir réussi :",
"txt-node-all": "Tout",
"txt-node-all-desc": "Contrôles Tout : Contrôles où tous doivent avoir réussi :",
"txt-node-screenshot-alt": "Capture d'écran des règles vérifiées"
}
Loading

0 comments on commit f96aef3

Please sign in to comment.