From c765093790d53940b3d7810085441d3706d17229 Mon Sep 17 00:00:00 2001 From: Tyler Jones Date: Mon, 9 Dec 2024 16:58:01 -0500 Subject: [PATCH] Add `role="radiogroup"` to fieldset in Radio group component (#3235) --- .changeset/sharp-jokes-notice.md | 5 +++++ app/lib/primer/forms/radio_button_group.html.erb | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/sharp-jokes-notice.md diff --git a/.changeset/sharp-jokes-notice.md b/.changeset/sharp-jokes-notice.md new file mode 100644 index 0000000000..0610459244 --- /dev/null +++ b/.changeset/sharp-jokes-notice.md @@ -0,0 +1,5 @@ +--- +'@primer/view-components': patch +--- + +Adds `role="radiogroup"` on `fieldset` in radio group component diff --git a/app/lib/primer/forms/radio_button_group.html.erb b/app/lib/primer/forms/radio_button_group.html.erb index cdfa2fb162..4683f4a4e5 100644 --- a/app/lib/primer/forms/radio_button_group.html.erb +++ b/app/lib/primer/forms/radio_button_group.html.erb @@ -1,5 +1,5 @@
- <%= content_tag(:fieldset, **@input.input_arguments) do %> + <%= content_tag(:fieldset, role: 'radiogroup', **@input.input_arguments) do %> <% if @input.label %> <%= content_tag(:legend, **@input.label_arguments) do %> <%= @input.label %>