Skip to content

Commit

Permalink
Merge pull request #248 from DFE-Digital/bugfix/accessibility-fixes
Browse files Browse the repository at this point in the history
Bugfix/accessibility fixes
  • Loading branch information
killij authored Sep 5, 2023
2 parents 4c202a3 + 9e28074 commit e4d4657
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/Views/Shared/_BackLink.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

@if (Model == null) return;

<div class="govuk-width-container jsonly">
<div class="govuk-width-container back-link">
@{
if (Model.Uri.ToLower().StartsWith("javascript:") && Model.Uri.Length > 11)
{
Expand Down
16 changes: 8 additions & 8 deletions Childrens-Social-Care-CPD/Views/Shared/_DetailedRole.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@

@functions {

public async Task RenderAccordianSection(string title, Document model)
public async Task RenderAccordianSection(string title, Document model, int id)
{
<div class="govuk-accordion__section">
<div class="govuk-accordion__section-header">
<h2 class="govuk-accordion__section-heading">
<span class="govuk-accordion__section-button" id="accordion-with-summary-sections-heading-2">
<span class="govuk-accordion__section-button" id="accordion-with-summary-sections-heading-@id">
@title
</span>
</h2>
</div>
<div id="accordion-with-summary-sections-content-2" class="govuk-accordion__section-content" aria-labelledby="accordion-with-summary-sections-heading-2">
<div id="accordion-with-summary-sections-content-@id" class="govuk-accordion__section-content" aria-labelledby="accordion-with-summary-sections-heading-@id">
@{
await Html.RenderPartialAsync("_RichText", model);
}
Expand Down Expand Up @@ -71,27 +71,27 @@

@if (Model.WhatYoullDo != null)
{
await RenderAccordianSection("What you'll do", Model.WhatYoullDo);
await RenderAccordianSection("What you'll do", Model.WhatYoullDo, 1);
}

@if (Model.SkillsAndKnowledge != null)
{
await RenderAccordianSection("Skills and knowledge", Model.SkillsAndKnowledge);
await RenderAccordianSection("Skills and knowledge", Model.SkillsAndKnowledge, 2);
}

@if (Model.HowToBecomeOne != null)
{
await RenderAccordianSection("How to become one", Model.HowToBecomeOne);
await RenderAccordianSection("How to become one", Model.HowToBecomeOne, 3);
}

@if (Model.CareerPathsAndProgression != null)
{
await RenderAccordianSection("Career paths and progression", Model.CareerPathsAndProgression);
await RenderAccordianSection("Career paths and progression", Model.CareerPathsAndProgression, 4);
}

@if (Model.CurrentOpportunities != null)
{
await RenderAccordianSection("Current opportunities", Model.CurrentOpportunities);
await RenderAccordianSection("Current opportunities", Model.CurrentOpportunities, 5);
}
</div>
</div>
Expand Down
1 change: 0 additions & 1 deletion Childrens-Social-Care-CPD/Views/Shared/_SiteLayout.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<link rel="shortcut icon" sizes="16x16 32x32 48x48" href="~/assets/images/favicon.ico" type="image/x-icon">
</head>
<body class="govuk-template__body">
<noscript><style> .jsonly { display: none } </style></noscript>
<partial name="_CookiesAndAnalyticsConsent" />
<a href="#main-content" class="govuk-skip-link" data-module="govuk-skip-link">Skip to main content</a>
<partial name="_Header" />
Expand Down
3 changes: 2 additions & 1 deletion Childrens-Social-Care-CPD/styles/scss/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ $govuk-new-link-styles: true;
@import '../../node_modules/dfe-frontend-alpha/packages/dfefrontend';
@import "overrides/dfe-overrides";
@import "overrides/dfe-vertical-nav";
@import "overrides/govuk-overrides";
@import "overrides/govuk-overrides";
@import "overrides/site";
7 changes: 7 additions & 0 deletions Childrens-Social-Care-CPD/styles/scss/overrides/_site.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.back-link {
display: none;
}

.js-enabled .back-link {
display: block !important;
}
8 changes: 8 additions & 0 deletions Childrens-Social-Care-CPD/wwwroot/css/application.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Childrens-Social-Care-CPD/wwwroot/css/application.min.css

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit e4d4657

Please sign in to comment.