Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add area-describedby to components that use helperText #13371

Conversation

francinelucca
Copy link
Collaborator

@francinelucca francinelucca commented Mar 17, 2023

Closes #12722

Adds aria-describedby attribute to components that use helperText:

  • Multiselect
  • Dropdown
  • Combobox
  • DatePickerInput
  • NumberInput
  • ProgressBar
  • Select
  • TextArea
  • ControlledPasswordInput
  • PasswordInput
  • RadioButtonGroup -- todo: confirm with michael

Changelog

Changed

  • Added aria-describedby attribute in Multiselect, Dropdown, Combobox, DatePickerInput, NumberInput, Select, ProgressBar,TextArea, ControlledPasswordInput, PasswordInput, RadioButtonGroup

Testing / Reviewing

Components should behave and look exactly the same. Voiceover now reads helper text when focused on input

@netlify
Copy link

netlify bot commented Mar 17, 2023

Deploy Preview for carbon-components-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 641495c
🔍 Latest deploy log https://app.netlify.com/sites/carbon-components-react/deploys/642f78783b2ce600088fcfa5
😎 Deploy Preview https://deploy-preview-13371--carbon-components-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 17, 2023

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit 641495c
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/642f78781f2aa20008f16360
😎 Deploy Preview https://deploy-preview-13371--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested all components and all are working as intended.

One little thing, do we want to add helperText to the Playground Argtypes for DatePicker?

helperText: {
   control: { type: 'text' },
   table: {
     category: 'DatePickerInput',
   },
 },

@francinelucca
Copy link
Collaborator Author

Tested all components and all are working as intended.

One little thing, do we want to add helperText to the Playground Argtypes for DatePicker?

helperText: {
   control: { type: 'text' },
   table: {
     category: 'DatePickerInput',
   },
 },

done!

@francinelucca francinelucca changed the title fix(MultiSelect): add area-describedby to button fix: add area-describedby to components that use helperText Mar 22, 2023
@aledavila
Copy link
Contributor

aledavila commented Mar 23, 2023

@francinelucca LGTM! one thing I just merged in helperText for RadioButtonGroup. Could you add the aria-describedby to that component as well if you can please TIA

francinelucca and others added 9 commits March 31, 2023 10:47
…nk-help-text-with-component' of github.com:francinelucca/carbon into 12722-a11y-dropdown-does-not-use-aria-describedby-to-link-help-text-with-component
…722-a11y-dropdown-does-not-use-aria-describedby-to-link-help-text-with-component
…nk-help-text-with-component' of github.com:francinelucca/carbon into 12722-a11y-dropdown-does-not-use-aria-describedby-to-link-help-text-with-component
…722-a11y-dropdown-does-not-use-aria-describedby-to-link-help-text-with-component
@francinelucca
Copy link
Collaborator Author

Resubmitting for review.

For RadioButtonGroup and CheckboxGroup I tried setting the aria-describedby on the legend instead of the fieldset but got the same result. couldn't get mac's VoiceOver to read it. For both instances the accessibility tree correctly shows the description text:
image
image

so I decided to leave it in the fieldset. I found this proof case that saw voiceover skipping over the aria-describedby in fieldset in VoiceOver while other a11y tools did read it https://russmaxdesign.github.io/accessible-forms/fieldset-error02.html
FYI @mbgower

Copy link
Member

@alisonjoseph alisonjoseph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[a11y]: Dropdown does not use aria-describedby to link help text with component
4 participants