Skip to content

Commit

Permalink
bs4 fix family edit kb nav (#4227)
Browse files Browse the repository at this point in the history
* set tabindex and blur on edit button

* defocus and set tab index for dep edit buttons
  • Loading branch information
charlienparker committed Sep 13, 2024
1 parent 7aae0cf commit def81cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions app/views/insured/families/personal.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@
$("#person-<%= @person.id %> .append_consumer_info").html("<%= escape_javascript(render partial: "personal")%>");
personContainer.removeClass('hidden');
if ($("#family_information").length == 0) {
$("a[id^=edit-member]").addClass('disabled');
$("a[id^=edit-member]").attr('disabled', true);
$("a[id^=edit-member]").addClass('disabled').attr('tabindex', -1).blur();
}
}
applyListeners();
Expand Down
3 changes: 1 addition & 2 deletions app/views/insured/family_members/edit.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ if ($(".my-household-page").length == 0) {
personContainer.find('.append_consumer_info').html("<%= escape_javascript(render 'dependent_form', dependent: @dependent, person: @person) %>");
personContainer.removeClass('hidden');
if ($("#family_information").length == 0) {
$("a[id^=edit-member]").addClass('disabled');
$("a[id^=edit-member]").attr('disabled', true);
$("a[id^=edit-member]").addClass('disabled').attr('tabindex', -1).blur();
}
} else {
$(".append_consumer_info").replaceWith("<%= escape_javascript(render 'dependent_form', dependent: @dependent, person: @person) %>");
Expand Down
2 changes: 1 addition & 1 deletion app/views/insured/family_members/show.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if (!$(".my-household-page").length) {

$("#dependent_buttons").removeClass('hidden');
} else {
$("a[id^=edit-member]").removeClass('disabled').removeClass('hidden');
$("a[id^=edit-member]").removeClass('disabled').removeClass('hidden').attr('tabindex', 0);
$("#add-new-member").removeClass("hidden");
$("#new_employee_dependent_form").html($(document.createElement("div")).attr("id", "append_consumer_info"));
<% member = @dependent.family_member %>
Expand Down

0 comments on commit def81cb

Please sign in to comment.