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

Feature/radio group accessibility #1848

Merged
merged 5 commits into from
Feb 1, 2025

Conversation

harksha
Copy link
Contributor

@harksha harksha commented Jan 29, 2025

Update according to w3c https://www.w3.org/WAI/ARIA/apg/patterns/radio/

  • Dynamically set tabindex based on checked state - changing radio options should not be achieved through tab key - only initial focus
  • Add role="radio" and aria-checked attributes to radio component
  • Change radio wrapper from <div> to <li> for better semantics
  • Add ariaLabel prop to radio group for improved accessibility
  • Update radio group to use <ul> with role="radiogroup"

Checklist

List of tasks you have already done and plan to do.

  • Fix linting errors
  • Tests have been added / updated (or snapshots)

Change information

Describe your modifications here.

Issues

The issues you want to close, formatted as close #1.

Related Links

Links related to this pr.

Copy link

vercel bot commented Jan 29, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
varlet ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 29, 2025 0:20am

Copy link

vercel bot commented Jan 29, 2025

@grozavioana is attempting to deploy a commit to the varletjs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

pkg-pr-new bot commented Jan 29, 2025

Open in Stackblitz

@varlet/cli

npm i https://pkg.pr.new/@varlet/cli@1848

@varlet/icons

npm i https://pkg.pr.new/@varlet/icons@1848

@varlet/preset-tailwindcss

npm i https://pkg.pr.new/@varlet/preset-tailwindcss@1848

@varlet/preset-unocss

npm i https://pkg.pr.new/@varlet/preset-unocss@1848

@varlet/shared

npm i https://pkg.pr.new/@varlet/shared@1848

@varlet/import-resolver

npm i https://pkg.pr.new/@varlet/import-resolver@1848

@varlet/touch-emulator

npm i https://pkg.pr.new/@varlet/touch-emulator@1848

@varlet/ui

npm i https://pkg.pr.new/@varlet/ui@1848

@varlet/use

npm i https://pkg.pr.new/@varlet/use@1848

@varlet/vite-plugins

npm i https://pkg.pr.new/@varlet/vite-plugins@1848

commit: 01f707f

@harksha
Copy link
Contributor Author

harksha commented Jan 29, 2025

@haoziqaq please check chinese docs - I translated using AI :)

@haoziqaq haoziqaq merged commit e3a1648 into varletjs:dev Feb 1, 2025
5 of 6 checks passed
@haoziqaq
Copy link
Member

haoziqaq commented Feb 1, 2025

thx.

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

Successfully merging this pull request may close these issues.

3 participants