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

Fixed Toggle aria-labelledby #16151

Merged
merged 8 commits into from
May 14, 2024

Conversation

guidari
Copy link
Contributor

@guidari guidari commented Apr 8, 2024

Closes #16055

aria-labelledby is being set empty when there is no label for reference.

Changelog

Testing / Reviewing

  • Test with VO or inspect the Toggle button to check the attributes.

@guidari guidari requested a review from a team as a code owner April 8, 2024 18:42
Copy link

netlify bot commented Apr 8, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit 9375e6c
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6633d989fb69ef0008a6c9a3
😎 Deploy Preview https://deploy-preview-16151--v11-carbon-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 configuration.

@tay1orjones tay1orjones requested review from alisonjoseph and removed request for andreancardona April 15, 2024 16:32
@alisonjoseph
Copy link
Member

alisonjoseph commented Apr 15, 2024

Looks like the last example here the aria-labeledby is still empty?

Screenshot 2024-04-15 at 11 36 02 AM

@guidari
Copy link
Contributor Author

guidari commented Apr 16, 2024

Looks like the last example here the aria-labeledby is still empty?

Yeah. It is grabbing the label by the id. If you check the current storybook, you will see that is not reading the label with VO, because the aria-labeledby was obscuring the label or aria-label. That is why now it be can empty, so the user can set the aria-label

@guidari guidari requested a review from tay1orjones May 2, 2024 18:21
@alisonjoseph alisonjoseph added this pull request to the merge queue May 14, 2024
Merged via the queue into carbon-design-system:main with commit fd0f464 May 14, 2024
20 checks passed
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]: Toggle - there's currently no way to set aria-label if not showing the upper label for a Toggle
4 participants