Diferencia entre revisiones de «Página principal»
De WCAG Wiki
| Línea 97: | Línea 97: | ||
== form3 == | == form3 == | ||
<html> | <html> | ||
< | <!-- ============================= --> | ||
<!-- 1️⃣ COMBOS DE SELECCIÓN --> | |||
<!-- ============================= --> | |||
< | <b>Selecciona la universidad:</b><br/> | ||
<select id="universidad" style="margin:0.5em 0; padding:0.3em;" onchange="actualizarNombre()"> | |||
<option value="" disabled selected>-- Elige universidad --</option> | |||
<option value="UdL">UdL</option> | |||
<option value="UPSA">UPSA</option> | |||
<option value="UFV">UFV</option> | |||
<option value="UCV">UCV</option> | |||
</select> | |||
<br/> | |||
<b>Selecciona el subcriterio WCAG:</b><br/> | |||
<select id="subcriterio" style="margin:0.5em 0; padding:0.3em;" onchange="actualizarNombre()"> | |||
<option value="" disabled selected>-- Elige subcriterio --</option> | |||
</form> | <option value="1.1.1-A">1.1.1-A. Contenido no textual</option> | ||
<option value="1.3.1-A">1.3.1-A. Información y relaciones</option> | |||
<option value="1.3.4-A">1.3.4-A. Orientación</option> | |||
<option value="1.4.3-A">1.4.3-A. Contraste (mínimo)</option> | |||
<option value="2.4.3-A">2.4.3-A. Orden del foco</option> | |||
<option value="3.3.1-A">3.3.1-A. Identificación de errores</option> | |||
<option value="4.1.3-A">4.1.3-A. Mensajes de estado</option> | |||
</select> | |||
<br/><br/> | |||
<!-- ============================= --> | |||
<!-- 2️⃣ FORMINPUT DE PAGEFORMS --> | |||
<!-- ============================= --> | |||
<div id="contenedor-forminput"> | |||
{{#forminput:form=ActividadWCAG | |||
|button text=🧩 Crear ejemplo | |||
|placeholder=El nombre se generará automáticamente | |||
|id=nombrePagina | |||
|default value= | |||
}} | |||
</div> | |||
<!-- ============================= --> | |||
<!-- 3️⃣ SCRIPT PARA CONCATENAR Y COMPROBAR --> | |||
<!-- ============================= --> | |||
<script> | <script> | ||
async function | async function actualizarNombre() { | ||
const uni = document.getElementById('universidad').value; | const uni = document.getElementById('universidad').value; | ||
const sub = document.getElementById('subcriterio').value; | const sub = document.getElementById('subcriterio').value; | ||
if (!uni || !sub) | const input = document.querySelector('#contenedor-forminput input[type="text"]'); | ||
if (!uni || !sub || !input) return; | |||
// Construye el nombre base | |||
const baseName = `2025_26_${uni}_${sub}`; | const baseName = `2025_26_${uni}_${sub}`; | ||
let pageName = baseName; | let pageName = baseName; | ||
let contador = 1; | let contador = 1; | ||
// | // Comprueba si la página ya existe | ||
while (await paginaExiste(pageName)) { | while (await paginaExiste(pageName)) { | ||
const num = String(contador).padStart(3, '0'); | const num = String(contador).padStart(3, '0'); | ||
| Línea 146: | Línea 163: | ||
} | } | ||
input.value = pageName; // asigna el valor al campo de #forminput | |||
} | } | ||
// Función | // Función para consultar si la página existe | ||
async function paginaExiste(titulo) { | async function paginaExiste(titulo) { | ||
const response = await fetch(`/api.php?action=query&titles=${encodeURIComponent(titulo)}&format=json`); | const response = await fetch(`/api.php?action=query&titles=${encodeURIComponent(titulo)}&format=json`); | ||
| Línea 158: | Línea 172: | ||
const pages = data.query.pages; | const pages = data.query.pages; | ||
const key = Object.keys(pages)[0]; | const key = Object.keys(pages)[0]; | ||
return key !== "-1"; // si | return key !== "-1"; // true si existe | ||
} | } | ||
</script> | </script> | ||
</html> | </html> | ||
Revisión del 07:54 2 nov 2025
Listado de Pautas y Principios WCAG
Extracted from https://www.w3.org/TR/WCAG22/
(NO EXISTENTE EN CV WIKI:)
Crear nuevo Ejemplo WCAG
Introduce el nombre de la página en el cuadro de texto, según esta nomenglatura:
- Curso de creación: 2025_26_
- Universidad:
- UdL (Universidad de Lleida)
- UPSA (Universidad Pontificia de Salamanca)
- UFV Universidad Francisco de Vitoria
- UPM Universidad Politécnica de Madrid
- Identificador del subcriterio: 1.1.1-A
Si la página ya existe, añadir un numero (00X) a la dirección:
- 2025_26_UdL_1.1.1-A_001
FORM
🔹 Al seleccionar un subcriterio y pulsar el botón, se abrirá el formulario ActividadWCAG para crear una nueva página con el nombre correspondiente.
form 2
Selecciona el identificador:
form3
Selecciona la universidad:
Selecciona el subcriterio WCAG:
{{#forminput:form=ActividadWCAG
|button text=🧩 Crear ejemplo
|placeholder=El nombre se generará automáticamente
|id=nombrePagina
|default value=
}}
