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

[Bug]: Getting Accessibility error(AVT) for Radio button group without legendText. #10401

Closed
2 tasks done
priyanka1304 opened this issue Jan 13, 2022 · 10 comments
Closed
2 tasks done

Comments

@priyanka1304
Copy link

Package

carbon-components, carbon-components-react

Browser

Chrome

Package version

v7.50.0

React version

16.13.1

Description

  1. Getting Accesibility error when radio button group is created with out legendText.

Screenshot 2022-01-13 at 5 11 07 PM

Screenshot 2022-01-05 at 6 05 01 PM

CodeSandbox example

https://codesandbox.io/s/sweet-moore-pydjy?file=/src/index.js

Steps to reproduce

To reproduce this error accessibility checker tool is required.
Screen shots are attached. Those can be refered.

Code of Conduct

@jnm2377
Copy link
Contributor

jnm2377 commented Jan 20, 2022

Hi @priyanka1304 thanks for opening this. I can confirm I'm able to reproduce this AVT error even in our latest version. I think we have a few options:

  1. make the prop legendText required
  2. add a default value for legendText so that there's always a legend

@dakahn do you have any thoughts on this?

@priyanka1304
Copy link
Author

Hi @priyanka1304 thanks for opening this. I can confirm I'm able to reproduce this AVT error even in our latest version. I think we have a few options:

  1. make the prop legendText required
  2. add a default value for legendText so that there's always a legend

@dakahn do you have any thoughts on this?

Thanks for reply. If I will give any value to legendText , then a "Radio button heading" will be shown in the UI. But we want to use the radio button group with out radio button heading. can you confirm it's possible or not?

@tw15egan
Copy link
Collaborator

We have a hideLabel prop for RadioButton that visually hides the label, but keeps it in the DOM for a11y purposes. We could probably add a similar hideLegend prop to RadioButtonGroup to resolve this issue.

@priyanka1304
Copy link
Author

Thanks for the response. Can I know , is anyone working on this issue?

@tw15egan
Copy link
Collaborator

tw15egan commented Feb 1, 2022

No one is currently working on this issue. @dakahn would this be a viable solution?

@TannerS
Copy link
Contributor

TannerS commented Feb 10, 2022

hey Guys, found this issue and thought I would take a jab. i went off @tw15egan 's idea of the hideLegend prop idea. I mimiced other components on how they do this and tested and it appears to fix the a11y which I tested in the storybook. You just have to have a text in the legendText and pass the hideLegend prop.

Here is the PR: #10682

I am not sure if you guys wanna go this route or not, but let me know and I can change it up how ever you like

CC: @jnm2377

@priyanka1304
Copy link
Author

Hi
I tried using hideLegend prop to hide the text in legendText, but it's not happening for me.
I used "carbon-components": "10.53.0",
"carbon-components-react": "7.53.0" versions.
Can you please tell me which version of carbon should be used for this. or any supporting library to be added.

@TannerS
Copy link
Contributor

TannerS commented Feb 23, 2022

Hi I tried using hideLegend prop to hide the text in legendText, but it's not happening for me. I used "carbon-components": "10.53.0", "carbon-components-react": "7.53.0" versions. Can you please tell me which version of carbon should be used for this. or any supporting library to be added.

I think it's in that version, can you recreate it in a sandbox and I can take a look? If there's any bugs I can try a fix

@TannerS
Copy link
Contributor

TannerS commented Feb 23, 2022

ah found it, @priyanka1304 it will be in the next version #10715

@tw15egan
Copy link
Collaborator

Thanks for fixing this @TannerS . As Tanner said, this will be included in the next release.

@tw15egan tw15egan moved this to ✅ Done in Design System Feb 23, 2022
kennylam added a commit to kennylam/carbon that referenced this issue Jul 30, 2024
…m#10401)

* feat(overflow-menu): sync @carbon/raect v11

* fix(overflow-menu): update story

* fix(copy): changed properties

* fix(overflow): format

* fix(overflow): update errors

* fix(overflow): update prefix

* fix(overflow): cleanup

* fix(container): styles

* fix(overflow): add index to storybook

* fix(overflow): add preventDefault for enter

* Update packages/carbon-web-components/src/components/overflow-menu/overflow-menu.scss

Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>

* Update packages/carbon-web-components/src/components/overflow-menu/overflow-menu.scss

Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>

* fix(overflow): cleanup prefix

* fix(overflow-menu): remove tabindex/role

* fix(overflow): align icon

---------

Co-authored-by: kennylam <909118+kennylam@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

4 participants