Add an aria-label to the "choose your booth" select
We're using the `aria-label` attribute instead of a label because this is a page where only one field is rendered and the text of the label is the same as the text of the <h1> tag. We're using `aria-label` instead of `aria-labelledby` because the former is supported by Capybara.
This commit is contained in:
@@ -12,8 +12,8 @@
|
||||
<div class="small-12 column">
|
||||
<%= f.select :id,
|
||||
@booths.map { |booth| [booth.location, booth.id] },
|
||||
selected: @booths.first,
|
||||
label: false %>
|
||||
{ selected: @booths.first, label: false },
|
||||
{ "aria-label": t("officing.booth.new.title") } %>
|
||||
|
||||
<%= f.submit(t("devise_views.sessions.new.submit"), class: "button expanded") %>
|
||||
</div>
|
||||
|
||||
@@ -47,7 +47,7 @@ describe "Booth", :with_frozen_time do
|
||||
|
||||
expect(page).to have_content "Choose your booth"
|
||||
|
||||
select booth2.location, from: "booth_id"
|
||||
select booth2.location, from: "Choose your booth"
|
||||
click_button "Enter"
|
||||
|
||||
within("#officing-booth") do
|
||||
@@ -72,6 +72,6 @@ describe "Booth", :with_frozen_time do
|
||||
|
||||
expect(page).to have_content "Choose your booth"
|
||||
|
||||
expect(page).to have_select("booth_id", options: [booth1.location, booth2.location])
|
||||
expect(page).to have_select "Choose your booth", options: [booth1.location, booth2.location]
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user