Skip to content

Commit 3f64131

Browse files
osimukaEPedley
andauthored
rc/the-dads-got-it (#700)
* removing redundant command (#699) * feature/TSS-1438-contrast-uat-banner (#697) * updatin UAT label text banner colour for accessibility * fixing contrast radio on dev * fixing naming * TSS-1424-dmas-dac-custom-components-02-a-dev (#704) * fixing acceciblity issues on search * lint fix * TSS/1425-custom-components-03-company-accessibility (#703) * Adding href, role and aria-label tags to company cards to enable tab accessibility * Making the company name in the aria label dynamic * Updating href so that it takes the user to the correct location, i.e. company details * Adding interactivity to all elements within each card so a user can tab between each * Removing span tags * Prettier formating * using button element in accessiblity (#701) * using button element in accessiblity * adding aria label * fixing label on sector and affected comapnies for the remove button to be more accessible * lint fix * TSS-1873: Companies Form Labels (#705) * Adding label for top search bar * Adding label for bottom search bar * Updating text for top search box * Prettier formatting * Updating test to avoid using defunct tags (#706) --------- Co-authored-by: Elizabeth Pedley <[email protected]>
1 parent d1a0c0d commit 3f64131

File tree

10 files changed

+127
-54
lines changed

10 files changed

+127
-54
lines changed

Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ django-collectstatic: ## Collect static files.
3434
django-static: ## Compress SCSS and collect static files, clears staticfiles folder.
3535
docker-compose exec web ./manage.py collectstatic --no-input -i *.scss --clear
3636

37+
.PHONY: react-watch
38+
react-watch: ## Run react's dev server (tailing).
39+
npm run dev
40+
3741
.PHONY: django-test
3842
django-test: ## Run django tests. (Use path=appname/filename::class::test) to narrow down
3943
docker-compose exec web pytest -n 6 tests/$(path)

core/frontend/src/css/app-components/_badges.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@
3131
}
3232

3333
&--in-tab {
34-
background-color: $govuk-orange;
34+
background-color: #fcd6c3;
35+
color: #6e3619;
3536
text-transform: none;
3637
font-size: 16px;
3738
margin-left: govuk-em(8, 16);
3839
padding: govuk-em(4, 16) govuk-em(8, 16);
3940
line-height: 1;
41+
42+
&:hover {
43+
color: #6e3619;
44+
}
4045
}
4146

4247
&--attention{

core/frontend/src/css/app-components/_env-banner.scss

+6-1
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@
1818

1919
&.env-banner-dev {
2020
background-color: #3c5cff;
21+
color: #F2F2F2;
2122
}
2223

2324
&.env-banner-uat {
2425
background-color: #FF69B4;
26+
color: #0b0c0c;
2527
}
2628

2729
.env-banner__dismiss {
2830
float: right;
29-
color: white !important;
31+
color: #F2F2F2 !important;
3032
text-decoration: none;
33+
&.env-banner__dismiss--uat {
34+
color: #0b0c0c !important;
35+
}
3136
}
3237

3338
@media (min-width: 800px ){

core/frontend/src/css/app-components/_typeahead.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
$highlight-colour: $govuk-light-grey;;
1+
$highlight-colour: $govuk-light-grey;
22

33
.multiselect {
44
color: $govuk-black;

core/frontend/src/js/pages/report/sectors-wizard-step.js

+16-11
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ ma.pages.report.sectorsWizardStep = function () {
2020
appendSector(
2121
"id_barrier-sectors-affected-sectors",
2222
"sectors_select",
23-
"sectors_list_display"
23+
"sectors_list_display",
2424
);
2525
otherSectorSelect.style.display = "none";
2626
}
@@ -60,7 +60,7 @@ ma.pages.report.sectorsWizardStep = function () {
6060
const updateSectorDisplay = function () {
6161
const sector_list = document.getElementById("sectors_select");
6262
const current_selected_list = document.getElementById(
63-
"id_barrier-sectors-affected-sectors"
63+
"id_barrier-sectors-affected-sectors",
6464
);
6565
const display_list = document.getElementById("sectors_list_display");
6666

@@ -75,21 +75,26 @@ ma.pages.report.sectorsWizardStep = function () {
7575
if (option.value == selected_list[i]) {
7676
let sector_entry = document.createElement("li");
7777
sector_entry.classList.add(
78-
"selection-list__list__item"
78+
"selection-list__list__item",
7979
);
8080
sector_entry.appendChild(
81-
document.createTextNode(option.text)
81+
document.createTextNode(option.text),
8282
);
83-
let remove_link = document.createElement("a");
83+
// Add remove link to each sector
84+
let remove_link = document.createElement("button");
8485
let remove_link_text =
8586
document.createTextNode("remove");
86-
remove_link.setAttribute("href", "#");
87+
remove_link.setAttribute("type", "button");
88+
remove_link.setAttribute(
89+
"aria-label",
90+
`remove ${option.innerHTML}`,
91+
);
8792
remove_link.addEventListener("click", function () {
8893
removeItem(option.value);
8994
});
9095
remove_link.appendChild(remove_link_text);
9196
remove_link.classList.add(
92-
"selection-list__list__item__remove-form"
97+
"selection-list__list__item__remove-form__submit",
9398
);
9499
sector_entry.appendChild(remove_link);
95100
display_list.appendChild(sector_entry);
@@ -105,7 +110,7 @@ ma.pages.report.sectorsWizardStep = function () {
105110
// Hide newly selected option in the other sectors selection box
106111
otherSectorItemElementName = "other-sectors-select-".concat(sector);
107112
const otherSectorItem = document.getElementById(
108-
otherSectorItemElementName
113+
otherSectorItemElementName,
109114
);
110115
otherSectorItem.style.display = "none";
111116
// Show previously selected option in the other sectors selection box
@@ -114,11 +119,11 @@ ma.pages.report.sectorsWizardStep = function () {
114119
currentMainSectorSelected != ""
115120
) {
116121
previousSectorItemElementName = "other-sectors-select-".concat(
117-
currentMainSectorSelected
122+
currentMainSectorSelected,
118123
);
119124
console.log(previousSectorItemElementName);
120125
const previousSectorItem = document.getElementById(
121-
previousSectorItemElementName
126+
previousSectorItemElementName,
122127
);
123128
previousSectorItem.style.display = "block";
124129
}
@@ -129,7 +134,7 @@ ma.pages.report.sectorsWizardStep = function () {
129134

130135
const removeItem = function (item) {
131136
const current_selected_list = document.getElementById(
132-
"id_barrier-sectors-affected-sectors"
137+
"id_barrier-sectors-affected-sectors",
133138
);
134139
if (current_selected_list.value == "") {
135140
const selected_list = current_selected_list.value;

0 commit comments

Comments
 (0)