OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
a11y[Op#52605]: Announce access granted message as first result
Kabiru Mwenjacea19d9bfa7a
diff --git a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erbindex 12bf95627b8..24401a76624 100644--- a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb+++ b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.html.erb@@ -19,12 +19,14 @@data: {'storages--oauth-access-grant-nudge-modal-target': 'header'},- test_selector: 'oauth-access-grant-nudge-modal-header'+ test_selector: 'oauth-access-grant-nudge-modal-header',+ visually_hide_title: authorized)dialog.with_body(id: dialog_body_id,- test_selector: 'oauth-access-grant-nudge-modal-body'+ test_selector: 'oauth-access-grant-nudge-modal-body',+ aria: { hidden: authorized }) doconcat(render(diff --git a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rbindex 270f9869f1a..61e02d1a03b 100644--- a/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb+++ b/modules/storages/app/components/storages/admin/oauth_access_grant_nudge_modal_component.rb@@ -49,9 +49,11 @@ module Storages::Adminprivatedef title- return if authorized-- I18n.t('storages.oauth_grant_nudge_modal.title')+ if authorized+ I18n.t('storages.oauth_grant_nudge_modal.access_granted_screen_reader', storage: project_storage.storage.name)+ else+ I18n.t('storages.oauth_grant_nudge_modal.title')+ endenddef waiting_titlediff --git a/modules/storages/config/locales/en.yml b/modules/storages/config/locales/en.ymlindex af70f976de5..b31b75dfcde 100644--- a/modules/storages/config/locales/en.yml+++ b/modules/storages/config/locales/en.yml@@ -180,6 +180,7 @@ en:of each desired project to use it.oauth_grant_nudge_modal:access_granted: Access granted+ access_granted_screen_reader: Access granted. You are now ready to use %{storage}.body: To get access to the project folder you need to login to %{storage}.cancel_button_label: I will do it laterconfirm_button_aria_label: Login to %{storage}diff --git a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rbindex fe2b6c0c023..9cc9a080d48 100644--- a/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb+++ b/modules/storages/spec/components/storages/admin/oauth_access_grant_nudge_modal_component_spec.rb@@ -49,6 +49,7 @@ RSpec.describe Storages::Admin::OAuthAccessGrantNudgeModalComponent, type: :compexpect(page).to have_test_selector('oauth-access-grant-nudge-modal-body',text: "To get access to the project folder you need to login to #{project_storage.storage.name}.",+ aria: { hidden: false })expect(page).to have_button('I will do it later')@@ -62,10 +63,20 @@ RSpec.describe Storages::Admin::OAuthAccessGrantNudgeModalComponent, type: :compendit 'renders a success modal' do- expect(page).to have_text('Access granted')+ expect(page).to have_css(+ 'h1.sr-only',+ text: "Access granted. You are now ready to use #{project_storage.storage.name}"+ )++ expect(page).to have_test_selector(+ 'oauth-access-grant-nudge-modal-body',+ text: 'Access granted',+ aria: { hidden: true }+ )expect(page).to have_test_selector('oauth-access-grant-nudge-modal-body',text: "You are now ready to use #{project_storage.storage.name}",+ aria: { hidden: true })expect(page).to have_button('Close')