helpscout / hsds-react

Help Scout Design System (HSDS) — React Component Library
MIT License
86 stars 17 forks source link

Fix aria-describedby attribute on Choice component to use id, not raw text #1018

Closed jakubjanczyk closed 2 years ago

jakubjanczyk commented 2 years ago

Problem/Feature

This small PR fixes a11y issue on Choice component (used inside Checkbox). When helpText attribute is provided, previously it was set as aria-describedby attribute. However, this attribute should receive ID of an element. The change here is to assign ID (based on ID of Choice element) to Help Text div and use this id for aria-describedby attributes in input

Guidelines

Make sure the pull request:

cloudflare-workers-and-pages[bot] commented 2 years ago

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: af92f21
Status: ✅  Deploy successful!
Preview URL: https://27a21cee.hsds-react.pages.dev

View logs