UKHO / admiralty-design-system

MIT License
5 stars 0 forks source link

[BUG] ARC Tool issue - Empty Lable Text #214

Closed Satyam15302 closed 1 day ago

Satyam15302 commented 3 months ago

Describe the Bug

An accessibility issue has been identified where a form control lacks an associated label text. This issue causes screen readers and assistive technologies to struggle in conveying the purpose of the control, violating WCAG 2.2 Success Criterion 1.3.1 (Info and Relationships).

To Reproduce

Steps to reproduce the behavior:

  1. Open the web application.

  2. Navigate to the "Confirm exchange set content" page.

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

  4. Observe the error regarding empty label text for checkboxes.

Expected Behavior

Each checkbox should have an associated <label> element with a clear and descriptive text to explain its function, enhancing accessibility and user experience.

Screenshots

Empty label text

Additional Context

This issue affects the accessibility of checkboxes used for selecting ENC items. The checkboxes lack proper label associations, making it difficult for users who rely on screen readers to understand the purpose of these controls. Ensure that each checkbox has an associated <label> element with a descriptive text to resolve this issue.

KatiePUX commented 2 weeks ago

We need a mechanism to have aria - label without rendering the label text Current thoughts - new prop to prevent render and don't render a label if no label text Updates examples on design system web page to state check box should always have a label unless using in a context where the label is clear like a table.

developernm commented 1 week ago

PR - fix