UKHO / admiralty-design-system

MIT License
5 stars 0 forks source link

[BUG] ARC Tool issue - Visible label with hidden input. #216

Open Satyam15302 opened 3 months ago

Satyam15302 commented 3 months ago

Describe the bug

A <label> element is referencing a hidden <input> element. This can cause confusion for users relying on screen readers and other assistive technologies, as they may not be able to interact with the hidden input as intended. This violates WCAG 2.2 Success Criterion 4.1.2 (Name, Role, Value).

To Reproduce

Steps to reproduce the behavior:

  1. Open the web application.

  2. Navigate to the "Selecting ENCs" page.

  3. Use a web accessibility testing tool (e.g., ARC Toolkit).

  4. Observe the error regarding the <label> referencing a hidden <input> element.

Expected behavior

Labels should be associated with visible input elements to ensure that users can interact with them correctly. If an input needs to be hidden, consider using an alternative method to ensure it remains accessible.

Screenshots

Visible label with hidden input

Additional context

This issue affects the file upload section where a <label> with the class sc-admiralty-file-input is referencing an input that is hidden. Ensure that input elements referenced by labels are visible or provide alternative accessible methods for user interaction.

KatiePUX commented 2 weeks ago

Fixed on 27th August