forked from egbot/Symbiota
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Move accessibility toggle button and associated components out of footer into single contained file that can be added to footer, header, or other location via an include function - Move accessibility files into accessibility directory - Migrate accessibility.footer.css js into accessibilityUtil.js file - Move accessibility language terms into their own lang files
- Loading branch information
Showing
16 changed files
with
147 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
if($LANG_TAG == 'en' || !file_exists($SERVER_ROOT.'/content/lang/templates/accessibility.' . $LANG_TAG . '.php')) | ||
include_once($SERVER_ROOT . '/content/lang/templates/accessibility.en.php'); | ||
else include_once($SERVER_ROOT . '/content/lang/templates/accessibility.' . $LANG_TAG . '.php'); | ||
?> | ||
<dialog id="accessibility-modal" class="accessibility-dialog" aria-label="<?= $LANG['A_ACCESSIBILITY_OPTIONS']; ?>"> | ||
<h1><?= $LANG['A_ACCESSIBILITY_OPTIONS']; ?></h1> | ||
<p class="bottom-breathing-room-rel"><?= $LANG['A_ACCESSIBILITY_OPTIONS_DESCRIPTION']; ?></p> | ||
<button type="button" class="btn btn-primary bottom-breathing-room-rel" onclick="toggleAccessibilityStyles()" id="accessibility-button" data-accessibility="accessibility-button"> | ||
<?= $LANG['A_TOGGLE_508_ON'] ?> | ||
</button> | ||
<form method="dialog"> | ||
<button type="submit" class="btn btn-primary"><?= $LANG['A_CLOSE']; ?></button> | ||
</form> | ||
</dialog> | ||
<button id="accessibility-options-button" type="button" class="btn btn-primary accessibility-option-button"> | ||
<span class="button__item-container"> | ||
<?= $LANG['A_ACCESSIBILITY_OPTIONS']; ?> | ||
<span> | ||
<img alt="<?= $LANG['A_ACCESSIBILITY_ICON'] ?>" src="<?= $CLIENT_ROOT ?>/images/accessibility_FILL0_wght400_GRAD0_opsz24.svg" /> | ||
</span> | ||
</span> | ||
</button> | ||
<script type="text/javascript"> | ||
const toggleOff508Text = "<?= $LANG['A_TOGGLE_508_OFF'] ?>"; | ||
const toggleOn508Text = "<?= $LANG['A_TOGGLE_508_ON'] ?>"; | ||
const clientRootPath = "<?= $CLIENT_ROOT ?>"; | ||
</script> | ||
<link href="<?= $CSS_BASE_PATH ?>/symbiota/accessibility-controls.css?ver=<?= $CSS_VERSION ?>" type="text/css" rel="stylesheet"> | ||
<?php | ||
if($ACCESSIBILITY_ACTIVE){ | ||
?> | ||
<link href="<?= $CSS_BASE_PATH ?>/symbiota/accessibility-compliant.css?ver=<?= $CSS_VERSION ?>" type="text/css" rel="stylesheet" data-accessibility-link="accessibility-css-link" > | ||
<link href="<?= $CSS_BASE_PATH ?>/symbiota/condensed.css?ver=<?= $CSS_VERSION ?>" type="text/css" rel="stylesheet" data-accessibility-link="accessibility-css-link" disabled > | ||
<?php | ||
} else{ | ||
?> | ||
<link href="<?= $CSS_BASE_PATH ?>/symbiota/accessibility-compliant.css?ver=<?= $CSS_VERSION ?>" type="text/css" rel="stylesheet" data-accessibility-link="accessibility-css-link" disabled > | ||
<link href="<?= $CSS_BASE_PATH ?>/symbiota/condensed.css?ver=<?= $CSS_VERSION ?>" type="text/css" rel="stylesheet" data-accessibility-link="accessibility-css-link" > | ||
<?php | ||
} | ||
?> | ||
<script src="<?= $CLIENT_ROOT ?>/js/symb/accessibilityUtils.js?ver=1b" type="text/javascript"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
include_once('../../config/symbini.php'); | ||
$currentlyEnabledStylesheet = $_REQUEST['currentEnabledStylesheet']; | ||
//session_start(); | ||
$accessiblePath = $CSS_BASE_PATH . '/symbiota/condensed.css?ver=14'; | ||
$condensedPath = $CSS_BASE_PATH . '/symbiota/accessibility-compliant.css?ver=14'; | ||
if($currentlyEnabledStylesheet === $condensedPath){ | ||
$_SESSION['active_stylesheet'] = $accessiblePath; | ||
} else{ | ||
$_SESSION['active_stylesheet'] = $condensedPath; | ||
} | ||
echo $_SESSION['active_stylesheet']; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/* | ||
------------------ | ||
Language: English | ||
------------------ | ||
*/ | ||
|
||
|
||
$LANG['A_TOGGLE_508_OFF'] = 'Toggle Condensed Form Layout'; | ||
$LANG['A_TOGGLE_508_ON'] = 'Toggle Vertical Form Layout'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS'] = 'Accessibility Options'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS_DESCRIPTION'] = 'More accessibility features will be added over time. Toggle those that suit your needs.'; | ||
$LANG['A_CLOSE'] = 'Close'; | ||
$LANG['A_ACCESSIBILITY_ICON'] = 'accessibility icon of a person'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/* | ||
------------------ | ||
Language: Español (Spanish) | ||
------------------ | ||
*/ | ||
|
||
|
||
$LANG['A_TOGGLE_508_OFF'] = 'Alternar el Diseño de Formulario Condensado'; | ||
$LANG['A_TOGGLE_508_ON'] = 'Alternar Diseño de Formulario Vertical'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS'] = 'Opciones de accesibilidad'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS_DESCRIPTION'] = 'Con el tiempo se agregarán más funciones de accesibilidad. Alterna aquellos que se adapten a tus necesidades.'; | ||
$LANG['A_CLOSE'] = 'Cerrar'; | ||
$LANG['A_ACCESSIBILITY_ICON'] = 'icono de accesibilidad de una persona'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/* | ||
------------------ | ||
Language: Français (French) | ||
------------------ | ||
*/ | ||
|
||
|
||
$LANG['A_TOGGLE_508_OFF'] = 'Utiliser la Mise en Page de Formulaire Condensé'; | ||
$LANG['A_TOGGLE_508_ON'] = 'Basculer la Disposition Verticale du Formulaire'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS'] = 'Options d\'accessibilité'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS_DESCRIPTION'] = 'D\'autres fonctionnalités d\'accessibilité seront ajoutées au fil du temps. Basculez ceux qui correspondent à vos besoins.'; | ||
$LANG['A_CLOSE'] = 'Fermer'; | ||
$LANG['A_ACCESSIBILITY_ICON'] = "icône d'accessibilité d'une personne"; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
/* | ||
------------------ | ||
Language: Português (Portuguese) | ||
Translated by: Google Translate (2024-02-16) | ||
------------------ | ||
*/ | ||
|
||
$LANG['A_TOGGLE_508_OFF'] = 'Modo Condensado'; | ||
$LANG['A_TOGGLE_508_ON'] = 'Modo de Acessibilidade'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS'] = 'Opções de acessibilidade'; | ||
$LANG['A_ACCESSIBILITY_OPTIONS_DESCRIPTION'] = 'Mais recursos de acessibilidade serão adicionados ao longo do tempo. Alterne aqueles que atendem às suas necessidades.'; | ||
$LANG['A_CLOSE'] = 'Fechar'; | ||
$LANG['A_ACCESSIBILITY_ICON'] = 'ícone de acessibilidade de uma pessoa'; | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters