Use a caption to identify budget phases table

This makes the table easier to identify when writing tests and using
screen readers.

Since we do not render any other table captions anywhere else, we're
making the caption invisible so only screen reader users will be
affected by this change.
This commit is contained in:
Javi Martín
2021-03-07 16:50:35 +01:00
parent 150fb91686
commit a2a6ae7bdd
5 changed files with 10 additions and 3 deletions

View File

@@ -255,7 +255,7 @@ describe "Admin budgets", :admin do
expect(page).to have_select "Phase", selected: "Selecting projects"
expect(page).to have_table "budget-phases-table", with_cols: [
expect(page).to have_table "Phases", with_cols: [
[
"Information",
"Accepting projects",
@@ -278,7 +278,7 @@ describe "Admin budgets", :admin do
]
]
within_table "budget-phases-table" do
within_table "Phases" do
within "tr", text: "Information" do
expect(page).to have_css ".budget-phase-enabled.enabled"
expect(page).to have_link "Edit phase"