Skip to content

Commit

Permalink
Fix accessibility erros - add dl above dt and dd
Browse files Browse the repository at this point in the history
  • Loading branch information
Katy600 committed Dec 18, 2024
1 parent 51aacef commit 3824dfe
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 39 deletions.
12 changes: 6 additions & 6 deletions app/views/case_workers/court_data/_defendant.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -15,31 +15,31 @@
%li.govuk-summary-card__action
= govuk_link_to t('.court_data_link'), "#{ENV.fetch('VIEW_COURT_DATA_URL', nil)}/laa_references/new?id=#{defendant.hmcts.id}&urn=#{case_number}", target: :_blank
.govuk-summary-card__content
%dl.govuk-summary-list
.govuk-summary-list__row
.govuk-summary-list
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.name')
%dd.govuk-summary-list__value
= defendant.hmcts.name
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.maat_reference')
%dd.govuk-summary-list__value
= defendant.maat_reference
- if defendant.hmcts.start.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.start_date')
%dd.govuk-summary-list__value
= defendant.hmcts.start.strftime(Settings.date_format)
- if defendant.hmcts.end.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.end_date')
%dd.govuk-summary-list__value
= defendant.hmcts.end.strftime(Settings.date_format)
- if defendant.hmcts.contract_number.present?
.govuk-summary-list__row
%dl.govuk-summary-list__row
%dt.govuk-summary-list__key
= t('.contract_number')
%dd.govuk-summary-list__value
Expand Down
3 changes: 2 additions & 1 deletion app/views/shared/_new_claim.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
= t('shared.claim.claim_type')

.govuk-summary-card__content
%dl.govuk-summary-list
.govuk-summary-list

= render partial: 'shared/new_claim_and_case_type_details', locals: { claim: claim }

- if claim.agfs? && claim.case_type.present? && claim.requires_cracked_dates?
Expand Down
12 changes: 6 additions & 6 deletions app/views/shared/_new_claim_and_case_type_details.html.haml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
- unless claim.providers_ref.blank?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.provider_reference')
= t('.provider_reference')
%dd.govuk-summary-list__value
= claim.providers_ref

- unless claim.draft?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.claim_submitted')
= t('.claim_submitted')
%dd.govuk-summary-list__value
= claim.submitted_at

- if claim.case_workers.any? && current_user_is_caseworker? && current_user.persona.admin?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.assignee')
= t('.assignee')
%dd.govuk-summary-list__value
= claim.case_worker_names

Expand Down Expand Up @@ -53,7 +53,7 @@

%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.case_num')
= t('.case_num')
%dd.govuk-summary-list__value
= claim.case_number
%span.unique-id-small
Expand All @@ -74,14 +74,14 @@
- if claim.case_stage
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.case_stage')
= t('.case_stage')
%dd.govuk-summary-list__value
= claim.case_stage&.description

- if claim.display_case_type?
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.claim.case_type')
= t('.case_type')
%dd.govuk-summary-list__value
= claim.case_type&.name

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('external_users.claims.case_details.case_concluded_date.case_concluded_at')
%dd.govuk-summary-list__value
Expand Down
8 changes: 4 additions & 4 deletions app/views/shared/_new_claim_cracked_trial_details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
- else
- trial_cracked_at_third_key = t("#{cracked_trial_detail_translations}.trial_cracked_at_third.default")

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_fixed_notice_at")
%dd.govuk-summary-list__value
= claim.trial_fixed_notice_at.strftime(Settings.date_format) rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_fixed_at")
%dd.govuk-summary-list__value
= claim.trial_fixed_at.strftime(Settings.date_format) rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{cracked_trial_detail_translations}.trial_cracked_at")
%dd.govuk-summary-list__value
= claim.trial_cracked_at.strftime(Settings.date_format) rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= trial_cracked_at_third_key
%dd.govuk-summary-list__value
Expand Down
26 changes: 13 additions & 13 deletions app/views/shared/_new_claim_interim_details.html.haml
Original file line number Diff line number Diff line change
@@ -1,74 +1,74 @@
- fee = present(claim.interim_fee)

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.fee_type')
%dd.govuk-summary-list__value
= fee.fee_type.description

- if fee.is_interim_warrant?
%dl.govuk-summary-list
.govuk-summary-list__row.summary-page-table-two-row
.govuk-summary-list
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.warrant_fee.date_issued')
%dd.govuk-summary-list__value
= fee.warrant_issued_date

- if fee.warrant_executed_date.present?
%dl.govuk-summary-list
.govuk-summary-list__row.summary-page-table-two-row
.govuk-summary-list
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.warrant_fee.date_executed')
%dd.govuk-summary-list__value
= fee.warrant_executed_date
- else
- unless fee.is_disbursement?
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.ppe_total')
%dd.govuk-summary-list__value
= fee.quantity
- if fee.is_effective_pcmh?
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.effective_pcmh_date')
%dd.govuk-summary-list__value
= fee.effective_pcmh_date

- if fee.is_trial_start?
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.trial_start')
%dd.govuk-summary-list__value
= fee.first_day_of_trial

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.estimated_trial_length')
%dd.govuk-summary-list__value
= fee.estimated_trial_length

- if fee.is_retrial_start?
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.retrial_start')
%dd.govuk-summary-list__value
= fee.retrial_started_at

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.estimated_retrial_length')
%dd.govuk-summary-list__value
= fee.retrial_estimated_length

- if fee.is_retrial_new_solicitor?
.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.legal_aid_transfer_date')
%dd.govuk-summary-list__value
= fee.legal_aid_transfer_date

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t('shared.summary.trial_concluded_at')
%dd.govuk-summary-list__value
Expand Down
8 changes: 4 additions & 4 deletions app/views/shared/_new_claim_transfer_details.html.haml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- trial_detail_translations = 'external_users.claims.case_details.trial_detail_fields'

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.first_day_of_trial")
%dd.govuk-summary-list__value
= claim.first_day_of_trial.strftime(Settings.date_format) rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.estimated_trial_length")
%dd.govuk-summary-list__value
= claim.estimated_trial_length rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.actual_trial_length")
%dd.govuk-summary-list__value
= claim.estimated_trial_length rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.trial_concluded_at")
%dd.govuk-summary-list__value
Expand Down
8 changes: 4 additions & 4 deletions app/views/shared/_new_claim_trial_details.html.haml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
- trial_detail_translations = 'external_users.claims.case_details.trial_detail_fields'

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.first_day_of_trial")
%dd.govuk-summary-list__value
= claim.first_day_of_trial.strftime(Settings.date_format) rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.estimated_trial_length")
%dd.govuk-summary-list__value
= claim.estimated_trial_length rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.actual_trial_length")
%dd.govuk-summary-list__value
= claim.estimated_trial_length rescue ''

.govuk-summary-list__row.summary-page-table-two-row
%dl.govuk-summary-list__row.summary-page-table-two-row
%dt.govuk-summary-list__key
= t("#{trial_detail_translations}.trial_concluded_at")
%dd.govuk-summary-list__value
Expand Down

0 comments on commit 3824dfe

Please sign in to comment.