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
Apply aria-live="polite" to announce range changes
Alexander Brandon Coles5b6348064271
diff --git a/app/helpers/pagination_helper.rb b/app/helpers/pagination_helper.rbindex 3756c01ce4d..0000bfefc4d 100644--- a/app/helpers/pagination_helper.rb+++ b/app/helpers/pagination_helper.rb@@ -144,7 +144,12 @@ module PaginationHelpercontent_tag(:ul, class: "op-pagination--items op-pagination--items_start", role: "presentation") doconcat will_paginate(paginator, **, container: false)- concat content_tag(:li, "(#{page_first} - #{page_last}/#{total})", class: "op-pagination--range")+ concat content_tag(+ :li,+ "(#{page_first} - #{page_last}/#{total})",+ class: "op-pagination--range",+ aria: { live: "polite" }+ )endenddiff --git a/frontend/src/app/shared/components/table-pagination/table-pagination.component.html b/frontend/src/app/shared/components/table-pagination/table-pagination.component.htmlindex ac7df72fd4c..20106162216 100644--- a/frontend/src/app/shared/components/table-pagination/table-pagination.component.html+++ b/frontend/src/app/shared/components/table-pagination/table-pagination.component.html@@ -82,7 +82,7 @@<svg chevron-right-icon size="xsmall" class="op-pagination--item-link-icon op-pagination--item-link-icon_next" /></button></li>- <li class="op-pagination--range">+ <li class="op-pagination--range" aria-live="polite">{{currentRange}}<span *ngIf="pageNumbers.length === 1"id="op-pagination-empty-text"diff --git a/spec/helpers/pagination_helper_spec.rb b/spec/helpers/pagination_helper_spec.rbindex d471fe4c951..a51abf98ba2 100644--- a/spec/helpers/pagination_helper_spec.rb+++ b/spec/helpers/pagination_helper_spec.rb@@ -116,7 +116,7 @@ RSpec.describe PaginationHelper doit "shows the range of the entries displayed" dorange = "(#{(current_page * per_page) - per_page + 1} - " +"#{current_page * per_page}/#{total_entries})"- expect(pagination).to have_css(".op-pagination--range", text: range)+ expect(pagination).to have_css(".op-pagination--range", text: range, aria: { live: "polite" })endit "has different urls if the params are specified as options" do