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

accessibility for tables #289

Merged
merged 2 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ajax/dropdownMassiveActionField.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@

$search = $search[$_POST["id_field"]];

echo "<table class='tab_glpi' width='100%'><tr><td>";
echo "<table class='tab_glpi' width='100%' aria-label='Massive action table'><tr><td>";

$plugdisplay = false;
// Specific plugin Type case
Expand Down
2 changes: 1 addition & 1 deletion ajax/private_public.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
} else {
$val = $_SESSION['glpiactive_entity'];
}
echo "<table width='100%'>";
echo "<table width='100%' aria-label='public or private settings table'>";
echo "<tr><td>";
echo "<input type='hidden' name='is_private' value='0'>\n";
echo __('Public');
Expand Down
4 changes: 2 additions & 2 deletions ajax/resaperiod.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@

if (isset($_POST['type']) && isset($_POST['end'])) {

echo "<table width='90%'>";
echo "<table width='90%' aria-label='Periodicity settings table'>";
switch ($_POST['type']) {
case 'day' :
echo "<tr><td>".__('End date').'</td><td>';
Expand All @@ -57,7 +57,7 @@
echo "<tr><td>".__('End date').'</td><td>';
Html::showDateField('periodicity[end]', ['value' => $_POST['end']]);
echo "</td></tr></table>";
echo "<table class='tab_glpi'>";
echo "<table class='tab_glpi' aria-label='Days of the week selection table'>";
echo "<tr class='center'><td>&nbsp;</td>";
$days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday', 'Sunday'];
foreach ($days as $day) {
Expand Down
2 changes: 1 addition & 1 deletion ajax/ruleaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
$already_used = in_array($_POST["field"], $used);
}

echo "<table width='100%'><tr><td width='30%'>";
echo "<table width='100%'><tr><td width='30%' aria-label='Rule action settings table'>";
$rule = getItemForItemtype($_POST["sub_type"]);
$actions_options = $rule->getAllActions();
$action_type = '';
Expand Down
2 changes: 1 addition & 1 deletion ajax/subvisibility.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
if (Session::canViewAllEntities()) {
$params['toadd'] = [-1 => __('No restriction')];
}
echo "<table class='tab_format'><tr><td>";
echo "<table class='tab_format' aria-label='Visibility settings table'><tr><td>";
echo Entity::getTypeName(1);
echo "</td><td>";
Entity::dropdown($params);
Expand Down
2 changes: 1 addition & 1 deletion ajax/ticketsatisfaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}

if ($_POST['inquest_config'] > 0) {
echo "<table class='tab_cadre_fixe' width='50%'>";
echo "<table class='tab_cadre_fixe' width='50%' aria-label='Survey configuration table'>";
echo "<tr class='tab_bg_1'><td width='50%'>".__('Create survey after')."</td>";
echo "<td>";
Dropdown::showNumber('inquest_delay',
Expand Down
4 changes: 2 additions & 2 deletions front/dictionnary.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@
RuleCollection::titleBackup();
$dictionnaries = RuleCollection::getDictionnaries();

echo "<div class='center'><table class='tab_cadre'>";
echo "<div class='center'><table class='tab_cadre' aria-label='Dictionaries type table'>";
echo "<tr><th colspan='".count($dictionnaries)."'>" . __('Dictionaries') . "</th></tr>";
echo "<tr class='tab_bg_1'>";
foreach ($dictionnaries as $dictionnary) {
echo "<td class='top'><table class='tab_cadre'>";
echo "<td class='top'><table class='tab_cadre' aria-label='Dictionaries entries table'>";
echo "<tr><th>" . $dictionnary['type'] . "</th></tr>";
foreach ($dictionnary['entries'] as $entry) {
echo "<tr class='tab_bg_1'><td class='center b'>";
Expand Down
4 changes: 2 additions & 2 deletions front/find_num.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function fillidfield(Type,Id) {
echo "<p class='b'>".__('Search the ID of your hardware')."</p>";
echo " <form name='form1' method='post' action='".$_SERVER['PHP_SELF']."'>";

echo "<table class='tab_cadre_fixe'>";
echo "<table class='tab_cadre_fixe' aria-label='Search form>";
echo "<tr><th height='29'>".__('Enter the first letters (user, item name, serial or asset number)').
"</th></tr>";
echo "<tr><td class='tab_bg_1 center'>";
Expand All @@ -85,7 +85,7 @@ function fillidfield(Type,Id) {
echo "</div>";

if (isset($_POST["send"])) {
echo "<table class='tab_cadre_fixe'>";
echo "<table class='tab_cadre_fixe' aria-label='Search results table'>";
echo " <tr class='tab_bg3'>";
echo " <td class='center b' width='30%'>".__('Alternate username')."</td>";
echo " <td class='center b' width='20%'>".__('Hardware type')."</td>";
Expand Down
6 changes: 3 additions & 3 deletions front/helpdesk.public.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
$ticket->showFormHelpdesk(Session::getLoginUserID());

} else {
echo "<table class='tab_cadre_postonly'>";
echo "<table class='tab_cadre_postonly' aria-label='Search form'>";

$user = new User();
$user->getFromDB(Session::getLoginUserID());
Expand Down Expand Up @@ -123,7 +123,7 @@

echo "<tr class='noHover'>";
echo "<td class='top' width='50%'><br>";
echo "<table class='central'>";
echo "<table class='central' aria-label='Search results table for hardware items'>";
Plugin::doHook('display_central');
if (Session::haveRight('ticket', CREATE)) {
echo "<tr class='noHover'><td class='top'>";
Expand All @@ -148,7 +148,7 @@
echo "</table></td>";

echo "<td class='top' width='50%'><br>";
echo "<table class='central'>";
echo "<table class='central' aria-label='Search results table for software items'>";

// Show KB items
if (Session::haveRight('knowbase', KnowbaseItem::READFAQ)) {
Expand Down
2 changes: 1 addition & 1 deletion front/ldap.group.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
unset($_SESSION["ldap_group_filter2"]);
}

echo "<div class='center'><table class='tab_cadre'>";
echo "<div class='center'><table class='tab_cadre' aria-label='LDAP directory link'>";
echo "<tr><th>".__('Bulk import groups from a LDAP directory')."</th></tr>";
echo "<tr class='tab_bg_1'><td class='center b'>".
"<a href=\"ldap.group.import.php?next=servers\">". __('Import of new groups')."</a></td></tr>";
Expand Down
2 changes: 1 addition & 1 deletion front/ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
}

AuthLDAP::manageValuesInSession([], true);
echo "<div class='center'><table class='tab_cadre'>";
echo "<div class='center'><table class='tab_cadre' aria-label='LDAP directory link'>";
echo "<tr><th>".__('Bulk import users from a LDAP directory')."</th></tr>";

echo "<tr class='tab_bg_1'><td class='center b'>".
Expand Down
2 changes: 1 addition & 1 deletion front/migrationcleaner.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
Html::header(__('Migration cleaner'), $_SERVER['PHP_SELF'], "tools", "migration");

echo "<div class='spaced' id='tabsbody'>";
echo "<table class='tab_cadre_fixe'>";
echo "<table class='tab_cadre_fixe' aria-label='Migration tools'>";

echo "<tr><th>" . __('"Migration cleaner" tool') . "</td></tr>";

Expand Down
2 changes: 1 addition & 1 deletion front/report.contract.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@
if (count($iterator)) {
$item = new $key();
echo "<div class='center'><span class='b'>".$item->getTypeName(1)."</span></div>";
echo "<table class='tab_cadrehov'>";
echo "<table class='tab_cadrehov' aria-label='Hardware list under contract'>";
echo "<tr><th>".__('Name')."</th>";
echo "<th>".__('Deleted')."</th>";
if ($display_entity) {
Expand Down
4 changes: 2 additions & 2 deletions front/report.infocom.conso.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function display_infocoms_report($itemtype, $begin, $end) {
&& ($item = getItemForItemtype($itemtype))) {

echo "<h2>".$item->getTypeName(1)."</h2>";
echo "<table class='tab_cadre'>";
echo "<table class='tab_cadre' aria-label='Report Data for Each Item Type' >";

$valeursoustot = 0;
$valeurnettesoustot = 0;
Expand Down Expand Up @@ -300,7 +300,7 @@ function display_infocoms_report($itemtype, $begin, $end) {
$types = $CFG_GLPI["infocom_types"];

$i = 0;
echo "<table width='90%'><tr><td class='center top'>";
echo "<table width='90%' aria-label='Total Values'><tr><td class='center top'>";
while (count($types) > 0) {
$type = array_shift($types);

Expand Down
4 changes: 2 additions & 2 deletions front/report.infocom.php
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function display_infocoms_report($itemtype, $begin, $end) {

echo "<h2>".$item->getTypeName(1)."</h2>";

echo "<table class='tab_cadre'><tr><th>".__('Name')."</th>";
echo "<table class='tab_cadre' aria-label='Report Form'><tr><th>".__('Name')."</th>";
if ($display_entity) {
echo "<th>".Entity::getTypeName(1)."</th>";
}
Expand Down Expand Up @@ -310,7 +310,7 @@ function display_infocoms_report($itemtype, $begin, $end) {
$types = $CFG_GLPI["infocom_types"];

$i = 0;
echo "<table><tr><td class='top'>";
echo "<table aria-label='Report Data for Each Item Type'><tr><td class='top'>";

while (count($types) > 0) {
$type = array_shift($types);
Expand Down
4 changes: 2 additions & 2 deletions front/report.networking.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

// Titre

echo "<table class='tab_cadre' >";
echo "<table class='tab_cadre' aria-label='Network Report Form' >";
echo "<tr><th colspan='3'>&nbsp;".__('Network report')."</th></tr>";
echo "</table><br>";

Expand Down Expand Up @@ -101,7 +101,7 @@

if (countElementsInTableForMyEntities("glpi_netpoints") > 0) {
echo "<form name='form3' method='post' action='report.netpoint.list.php'>";
echo "<table class='tab_cadre' width='500'>";
echo "<table class='tab_cadre' width='500' aria-label='Report Choices by Location'>";
echo "<tr class='tab_bg_1'><td width='120'>".__('By network outlet')."</td>";
echo "<td>";
Netpoint::dropdownNetpoint("prise", 0, -1, 1, $_SESSION["glpiactive_entity"]);
Expand Down
2 changes: 1 addition & 1 deletion front/report.year.list.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
if (count($iterator)) {
$item = new $key();
echo "<div class='center b'>".$item->getTypeName(1)."</div>";
echo "<table class='tab_cadre_fixehov'>";
echo "<table class='tab_cadre_fixehov' aria-label='Device list' >";
echo "<tr><th>".__('Name')."</th>";
echo "<th>".__('Deleted')."</th>";
if ($display_entity) {
Expand Down
2 changes: 1 addition & 1 deletion front/rule.common.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
exit();
}

echo "<table class='tab_cadrehov'>";
echo "<table class='tab_cadrehov' aria-label='Replay the rules dictionary'>";

echo "<tr><th><div class='relative b'>" .$rulecollection->getTitle(). "<br>" .
__('Replay the rules dictionary'). "</div></th></tr>\n";
Expand Down
2 changes: 1 addition & 1 deletion front/setup.auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

Html::header(__('External authentication sources'), $_SERVER['PHP_SELF'], "config", "auth", -1);

echo "<table class='tab_cadre'>";
echo "<table class='tab_cadre' aria-label='External authentication sources'>";
echo "<tr><th>&nbsp;" . __('External authentications') . "</th></tr>";
if (Session::haveRight("config", UPDATE)) {
echo "<tr class='tab_bg_1'><td class='center b'>".
Expand Down
4 changes: 2 additions & 2 deletions front/stat.graph.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@
$stat = new Stat();

echo "<div class='center'>";
echo "<table class='tab_cadre'>";
echo "<table class='tab_cadre'> aria-label='External authentication sources'";
echo "<tr><td>";
if ($prev > 0) {
echo "<a href=\"".$_SERVER['PHP_SELF']."?$cleantarget&amp;date1=".$_POST["date1"]."&amp;date2=".
Expand All @@ -299,7 +299,7 @@
$target = preg_replace("/&/", "&amp;", $_SERVER["REQUEST_URI"]);

echo "<form method='post' name='form' action='$target'><div class='center'>";
echo "<table class='tab_cadre'>";
echo "<table class='tab_cadre' aria-label='Statistics'>";
echo "<tr class='tab_bg_2'><td class='right'>".__('Start date')."</td><td>";
Html::showDateField("date1", ['value' => $_POST["date1"]]);
echo "</td><td rowspan='2' class='center'>";
Expand Down
2 changes: 1 addition & 1 deletion front/stat.item.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
Stat::title();

echo "<div class='center'><form method='post' name='form' action='stat.item.php'>";
echo "<table class='tab_cadre'><tr class='tab_bg_2'>";
echo "<table class='tab_cadre'><tr class='tab_bg_2'> aria-label='Statistics'";
echo "<td class='right'>".__('Start date')."</td><td>";
Html::showDateField("date1", ['value' => $_POST["date1"]]);
echo "</td><td rowspan='2' class='center'>";
Expand Down
2 changes: 1 addition & 1 deletion front/stat.location.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
// keep it first param
echo "<input type='hidden' name='itemtype' value='". $_GET['itemtype'] ."'>";

echo "<table class='tab_cadre_fixe' ><tr class='tab_bg_2'><td rowspan='2' width='30%'>";
echo "<table class='tab_cadre_fixe' aria-label='Statistics report filter'><tr class='tab_bg_2'><td rowspan='2' width='30%'>";
$values = [_n('Dropdown', 'Dropdowns', Session::getPluralNumber()) => ['ComputerType' => _n('Type', 'Types', 1),
'ComputerModel' => _n('Model', 'Models', 1),
'OperatingSystem' => OperatingSystem::getTypeName(1),
Expand Down
2 changes: 1 addition & 1 deletion front/stat.tracking.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
// Keep it first param
echo "<input type='hidden' name='itemtype' value=\"". $_GET["itemtype"] ."\">";

echo "<table class='tab_cadre_fixe'>";
echo "<table class='tab_cadre_fixe' aria-label='Statistics report filter'>";
echo "<tr class='tab_bg_2'><td rowspan='2' class='center' width='30%'>";
Dropdown::showFromArray('type', $values, ['value' => $_GET['type']]);
echo "</td>";
Expand Down
2 changes: 1 addition & 1 deletion front/updatepassword.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
}

if ($success) {
echo '<table class="tab_cadre">';
echo '<table class="tab_cadre" aria-label="Password update form">';
echo '<tr><th colspan="2">' . __('Password update') . '</th></tr>';
echo '<tr>';
echo '<td>';
Expand Down
4 changes: 2 additions & 2 deletions inc/accessibility.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function showAccessForm($data = [], $displayShortcut = true) {
}

echo "<div class='center' id='tabsbody'>";
echo "<table class='tab_cadre_fixe' style='position: relative'>";
echo "<table class='tab_cadre_fixe' style='position: relative' aria-label='Accessibility settings'>";
echo "<tr><th colspan='4'>" . __('Interface') . "</th></tr>";
echo "<tr class='tab_bg_1' >";
echo "<td width='40%'><label for='access_zoom_level_drop$rand'>" .__('UI Scale') . "</label></td>";
Expand Down Expand Up @@ -324,7 +324,7 @@ function getShortcut(event){
echo "</div>";

echo "<div class='spaced'>";
echo "<table class='tab_cadre_fixe' style=' height: 120px; overflow-y: scroll;'>";
echo "<table class='tab_cadre_fixe' style=' height: 120px; overflow-y: scroll;' aria-label='Shortcuts'>";
echo "<tr >";
echo "<td width='100%' style='position: absolute; left: 50%; transform: translate(-50%, 0%);'>";
echo "<p style='width: 100%; overflow-wrap: break-word;' class='center' id='shortcut_added'></p>";
Expand Down
4 changes: 2 additions & 2 deletions inc/auth.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,7 @@ static function showSynchronizationForm(User $user)
]);

if ($result->numrows() > 0) {
echo "<table class='tab_cadre'><tr class='tab_bg_2'><td>";
echo "<table class='tab_cadre' aria-label='Synchronisation'><tr class='tab_bg_2'><td>";
echo "<input type='hidden' name='id' value='" . $user->getID() . "'>";
echo "<input class=submit type='submit' name='force_ldap_resynch' value='" .
__s('Force synchronization') . "'>";
Expand All @@ -1500,7 +1500,7 @@ static function showSynchronizationForm(User $user)
echo "</div>";

echo "<div class='spaced'>";
echo "<table class='tab_cadre'>";
echo "<table class='tab_cadre' aria-label='Authentication method'>";
echo "<tr><th>" . __('Change of the authentication method') . "</th></tr>";
echo "<tr class='tab_bg_2'><td class='center'>";
$rand = self::dropdown(['name' => 'authtype']);
Expand Down
Loading
Loading