carbon-design-system / ibm-products

A Carbon-powered React component library for IBM Products
https://ibm-products.carbondesignsystem.com
Apache License 2.0
97 stars 138 forks source link

[a11y]: The <label> element does not have descriptive text that identifies the expected input #6138

Closed parul-26 closed 1 month ago

parul-26 commented 1 month ago

Package

@carbon/ibm-products

Browser

Chrome

Operating System

MacOS

Package version

1.40.0

React version

18.2.0

Automated testing tool and ruleset

IBM Equal Access Accessibility Checker

Assistive technology

No response

Description

Missing Descriptive Text for

MultiSelect Dropdown Error Display Bug: There is a bug with the MultiSelect dropdown functionality where error messages are being displayed in an unintended location within the user interface. Instead of appearing directly below or next to the MultiSelect component, the error messages are shown elsewhere in the UI, making it unclear to users which input field the error refers to.

image

WCAG 2.1 Violation

No response

Reproduction/example

https://codesandbox.io/p/devbox/dazzling-sanderson-7p8z9k?workspaceId=aef1e2f0-a29f-4df8-8da4-6a62a57c276b

Steps to reproduce

1.Navigate to the page containing the MultiSelect dropdown. 2.Attempt to select an option or leave the selection blank in the MultiSelect dropdown that triggers an error (e.g., validation error). 3.Observe where the error message is displayed in the UI.

Code of Conduct

matthewgallo commented 1 month ago

Hey @parul-26, this appears to be related to @carbon/react, not @carbon/ibm-products. You can open issues for that package here.