Skip to content

feat: accessibility — add aria-labels to filters and form controls without a visible label #5

@scldrn

Description

@scldrn

Problem

Several interactive controls in the admin panel lack accessible labels, making them unusable with screen readers (NVDA, VoiceOver) and failing WCAG 2.1 AA minimum criteria.

Concrete cases identified

1. Inventory filter select missing aria-label

File: ruteria/app/(admin)/admin/inventario/page.tsx (~line 160)

// Current
<select value={filterCategoria} onChange={...} className="...">

// Correct
<select value={filterCategoria} onChange={...} aria-label="Filter by category" className="...">

2. Inputs in ProductoSheet without an associated <label>

File: ruteria/components/admin/ProductoSheet.tsx (~lines 89–122)

Inputs rely on placeholder as the only field indicator. Placeholders disappear on typing and are not a substitute for a proper label.

// Add htmlFor + id on each field, or aria-label where a label element isn't feasible
<label htmlFor="codigo-input">Code</label>
<input id="codigo-input" {...register('codigo')} />

Task

  1. Audit all <select> elements without <label> or aria-label in components/admin/ and app/(admin)/.
  2. Audit inputs in Sheets/Dialogs that only have placeholder.
  3. Add aria-label to controls where adding a visible <label> isn't feasible due to layout.
  4. Prefer <label htmlFor> when the visual space allows it.

Acceptance criteria

  • No <input>, <select>, or icon-only <button> is left without an accessible name.
  • Verifiable with the axe DevTools extension — zero "Form elements must have labels" errors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions