Skip to content

Commit 181fad5

Browse files
authored
Merge pull request #3601 from nhsuk/add-new-batch-label
Add `aria-label` to new batch buttons
2 parents 5c3ec78 + 6574d65 commit 181fad5

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

app/views/vaccines/index.html.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
<%= vaccine.manufacturer %>
88
</p>
99

10-
<%= govuk_button_link_to "Add a new batch", new_vaccine_batch_path(vaccine), secondary: true %>
10+
<%= govuk_button_link_to "Add a new batch",
11+
new_vaccine_batch_path(vaccine),
12+
secondary: true,
13+
aria: { label: "Add a new #{vaccine.brand} batch" } %>
1114

1215
<% if (batches = @batches_by_vaccine_id[vaccine.id]).present? %>
1316
<%= govuk_table do |table| %>

tests/accessibility.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ test("Accessibility", async ({ page }) => {
3535
await checkAccessibility(page);
3636

3737
// Vaccine page
38-
await page.getByRole("link", { name: "Gardasil 9" }).click();
38+
await page.getByRole("link", { name: "Gardasil 9 (HPV)" }).click();
3939
await expect(page.locator("h1")).toContainText("Gardasil 9");
4040
await checkAccessibility(page);
4141
});

0 commit comments

Comments
 (0)