Skip to content

Commit

Permalink
accessibility error on flash, remove mailing button color, mailing ad…
Browse files Browse the repository at this point in the history
…dress title added (#3941)

bugs worked with Ann
  • Loading branch information
kristinmerbach authored and charlienparker committed Sep 13, 2024
1 parent 34c260f commit 4454e85
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
6 changes: 2 additions & 4 deletions app/assets/javascripts/application.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -893,13 +893,11 @@ document.addEventListener('click', function(event) {
const addButton = event.target;
addButton.classList.add('d-none');
const removeButton = addButton.cloneNode(true);
console.log(removeButton);
removeButton.textContent = 'Remove Mailing Address';
removeButton.id = 'remove_mailing_address';
removeButton.classList.add('interaction-click-control-remove-mailing-address');
removeButton.classList.remove("d-none", "interaction-click-control-add-mailing-address");
removeButton.classList.add('interaction-click-control-remove-mailing-address', 'error');
removeButton.classList.remove("d-none", "btn-secondary", "interaction-click-control-add-mailing-address");
addButton.parentNode.insertBefore(removeButton, addButton);
console.log(removeButton);
document.querySelectorAll(".mailing-div").forEach(el => {
el.classList.remove('d-none');
el.classList.add('d-block');
Expand Down
2 changes: 1 addition & 1 deletion app/views/layouts/_flash.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<div class="col my-1 mr-auto p-0 align-self-center">
<%= raw message %>
</div>
<a class="close-icon icon pr-1 align-self-start" alt="Close" href="#">&nbsp;</a>
<a class="close-icon icon pr-1 align-self-start" alt="Close" href="#">&nbsp;<span class="sr-only">Close</span></a>
</div>
</div>
<% else %>
Expand Down
10 changes: 5 additions & 5 deletions app/views/shared/_consumer_home_address_fields.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
<% required = kind =='home' ? "address_required" : '' %>
<div class="address-row <%= div_class %> <%= display_class %>">
<% if kind == 'home' %>
<i class="fa fa-info-circle"></i> <%=l10n("insured.primary_home_address_info")%>
<i class="fa fa-info-circle"></i> <%= l10n("insured.primary_home_address_info") %>
<% elsif kind == 'mailing' %>
<div><strong class="mt-4"><%=l10n("insured.enter_mailing_address")%></strong></div>
<h4 class="gamma"><%= l10n("insured.consumer_roles.mailing_address") %></h4>
<i class="fa fa-info-circle"></i> <%=l10n("insured.primary_mailing_address_info")%>
<% end %>
</div>
Expand Down Expand Up @@ -104,10 +104,10 @@
<% end %>
</div>
<% if f.object.addresses[1].present? %>
<button class="form-action btn-secondary <%= pundit_class Family, :updateable?%>" id="remove_mailing_address" data-cuke="remove_mailing_address">Remove Mailing Address</button>
<button id="add_mailing_address" class="form-action btn-secondary <%= pundit_class Family, :updateable?%> mb-4 d-none">Add Mailing Address</button>
<button class="form-action btn-error <%= pundit_class Family, :updateable?%>" id="remove_mailing_address" data-cuke="remove_mailing_address">Remove Mailing Address</button>
<button id="add_mailing_address" class="form-action btn-secondary <%= pundit_class Family, :updateable?%> mb-4 d-none">Add Mailing Address</button>
<% else %>
<button id="add_mailing_address" class="form-action btn-secondary <%= pundit_class Family, :updateable?%> mb-4">Add Mailing Address</button>
<button id="add_mailing_address" class="form-action btn-secondary <%= pundit_class Family, :updateable?%> mb-4">Add Mailing Address</button>
<% end %>
<div class="mt-2">&nbsp;</div>
<% else %>
Expand Down
1 change: 1 addition & 0 deletions db/seedfiles/translations/en/dc/insured.rb
Original file line number Diff line number Diff line change
Expand Up @@ -644,6 +644,7 @@
:'en.insured.dependent_home_address_info' => "<strong>The home address is where this person legally resides.</strong> If they want to receive mail at another address such as an office or a PO Box, Select 'Add Mailing Address'",
:'en.insured.dependent_mailing_address_info' => "This is the <strong>address where this person wants to have their mail delivered.</strong> It may be the same or different from their home address.",
:'en.insured.enter_home_address' => "Enter your home address",
:'en.insured.mailing_address' => "Mailing Address",
:'en.insured.enter_mailing_address' => "Enter a mailing address",
:'en.insured.review_information' => "I have reviewed the information in this application and I attest, under penalty of perjury, that it is accurate and complete to the best of my knowledge. I understand that if I’m not truthful, there may be a penalty, including retroactive termination of my coverage and an obligation to repay all medical claims previous covered by the health insurance.",
:'en.insured.us_citizen' => "Is this person a US citizen or US national?",
Expand Down
1 change: 1 addition & 0 deletions db/seedfiles/translations/en/me/insured.rb
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@
:'en.insured.dependent_home_address_info' => "<strong>The home address is where this person legally resides.</strong> If they want to receive mail at another address such as an office or a PO Box, Select 'Add Mailing Address'",
:'en.insured.dependent_mailing_address_info' => "This is the <strong>address where this person wants to have their mail delivered.</strong> It may be the same or different from their home address.",
:'en.insured.enter_home_address' => "Enter your home address",
:'en.insured.mailing_address' => "Mailing Address",
:'en.insured.enter_mailing_address' => "Enter a mailing address",
:'en.insured.review_information' => "I have reviewed the information in this application and I attest, under penalty of perjury, that it is accurate and complete to the best of my knowledge. I understand that if I’m not truthful, there may be a penalty.",
:'en.insured.us_citizen' => "Is this person a US citizen or US national?",
Expand Down

0 comments on commit 4454e85

Please sign in to comment.