référencement des labels

This commit is contained in:
2025-12-05 21:24:33 +01:00
parent cd3946aeeb
commit 671b33ccca

View File

@@ -170,8 +170,8 @@ function definition_courante($definitions, $position) {
?> ?>
<input id="case-<?= chr($x + 65) . ($y + 1) ?>" type="text" maxlength="1" size="1" <input id="case-<?= chr($x + 65) . ($y + 1) ?>" type="text" maxlength="1" size="1"
pattern="[A-Z]" title="<?= $title ?>" pattern="[A-Z]" title="<?= $title ?>"
data-iddh="<?= isset($definition_horizontale["definition"])? "dh$y.$iddh" : "" ?>" data-iddh="<?= isset($definition_horizontale["definition"])? "dh-$y.$iddh" : "" ?>"
data-iddv="<?= isset($definition_verticale["definition"])? "dh$x.$iddv" : "" ?>" data-iddv="<?= isset($definition_verticale["definition"])? "dv-$x.$iddv" : "" ?>"
/> />
</td> </td>
<?php endif; ?> <?php endif; ?>
@@ -192,14 +192,14 @@ function definition_courante($definitions, $position) {
<?php if (count($definitions)): ?> <?php if (count($definitions)): ?>
<?php if (count($definitions) == 1): ?> <?php if (count($definitions) == 1): ?>
<?php foreach ($definitions as $id => $definition): ?> <?php foreach ($definitions as $id => $definition): ?>
<label id="<?= "dh$y.$id" ?>" for="case-1<?= $y + 1 ?>"> <label id="<?= "dh-$y.$id" ?>" for="case-1<?= $y + 1 ?>">
<?= formatter_definition($definition) ?> <?= formatter_definition($definition) ?>
</label> </label>
<?php endforeach ?> <?php endforeach ?>
<?php else: ?> <?php else: ?>
<ol> <ol>
<?php foreach ($definitions as $id => $definition): ?> <?php foreach ($definitions as $id => $definition): ?>
<label id="<?= "dh$y.$id" ?>" for="case-<?= chr($definition["debut"] + 0x41) ?><?= $y + 1 ?>"> <label id="<?= "dh-$y.$id" ?>" for="case-<?= chr($definition["debut"] + 0x41) ?><?= $y + 1 ?>">
<li><?= formatter_definition($definition) ?></li> <li><?= formatter_definition($definition) ?></li>
</label> </label>
<?php endforeach ?> <?php endforeach ?>
@@ -222,14 +222,14 @@ function definition_courante($definitions, $position) {
<?php if (count($definitions)): ?> <?php if (count($definitions)): ?>
<?php if (count($definitions) == 1): ?> <?php if (count($definitions) == 1): ?>
<?php foreach ($definitions as $id => $definition): ?> <?php foreach ($definitions as $id => $definition): ?>
<label id="<?= "dv$x.$id" ?>" for="case-<?= chr($x + 0x41) ?>1"> <label id="<?= "dv-$x.$id" ?>" for="case-<?= chr($x + 0x41) ?>1">
<?= formatter_definition($definition) ?> <?= formatter_definition($definition) ?>
</label> </label>
<?php endforeach ?> <?php endforeach ?>
<?php else: ?> <?php else: ?>
<ol> <ol>
<?php foreach ($definitions as $id => $definition): ?> <?php foreach ($definitions as $id => $definition): ?>
<label id="<?= "dv$x.$id" ?>" for="case-<?= chr($x + 0x41) ?><?= $definition["debut"] + 1 ?>"> <label id="<?= "dv-$x.$id" ?>" for="case-<?= chr($x + 0x41) ?><?= $definition["debut"] + 1 ?>">
<li><?= formatter_definition($definition) ?></li> <li><?= formatter_definition($definition) ?></li>
</label> </label>
<?php endforeach ?> <?php endforeach ?>