From 29cdb40d7b6372d6729463807df9c7c005fce2b5 Mon Sep 17 00:00:00 2001 From: Charlie Parker Date: Wed, 7 Aug 2024 14:25:01 -0400 Subject: [PATCH] bs4 fix family edit kb nav (#4227) * set tabindex and blur on edit button * defocus and set tab index for dep edit buttons --- app/views/insured/families/personal.js.erb | 3 +-- app/views/insured/family_members/edit.js.erb | 3 +-- app/views/insured/family_members/show.js.erb | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/app/views/insured/families/personal.js.erb b/app/views/insured/families/personal.js.erb index 4de6dddc2eb..c0ebf04497e 100644 --- a/app/views/insured/families/personal.js.erb +++ b/app/views/insured/families/personal.js.erb @@ -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(); diff --git a/app/views/insured/family_members/edit.js.erb b/app/views/insured/family_members/edit.js.erb index 33d8c10f284..b9a8d682731 100644 --- a/app/views/insured/family_members/edit.js.erb +++ b/app/views/insured/family_members/edit.js.erb @@ -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) %>"); diff --git a/app/views/insured/family_members/show.js.erb b/app/views/insured/family_members/show.js.erb index 724bb03850a..3216071e10b 100644 --- a/app/views/insured/family_members/show.js.erb +++ b/app/views/insured/family_members/show.js.erb @@ -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 %>