a11y: associate form labels with inputs (#15)

Month/year/slots selects get ids with matching <label for>; the employee name
input, the Excel import file input and the JSON import file input get
aria-labels so screen readers announce them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
ferdi2goandClaude Opus 4.8 committed 2026-06-03 13:06:50 +00:00
1 parent 7ab2911c2f
commit b3eeca50b3
3 files changed
+9

No files matched your search

+2
View File
@@ -22,6 +22,7 @@ export function renderEmployees() {
nameInput.id = 'emp-name-input';
nameInput.type = 'text';
nameInput.placeholder = 'Name eingeben...';
nameInput.setAttribute('aria-label', 'Mitarbeitername');
nameInput.style.width = '220px';
const addBtn = document.createElement('button');
@@ -37,6 +38,7 @@ export function renderEmployees() {
fileInput.id = 'emp-excel-input';
fileInput.type = 'file';
fileInput.accept = '.xlsx,.xls';
fileInput.setAttribute('aria-label', 'Excel-Datei mit Mitarbeiternamen importieren');
fileInput.style.display = 'none';
row.append(nameInput, addBtn, excelBtn, fileInput);