Skip to content

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

[60904] Advanced accessibility for the datepicker (#18638)

Behrokh Satarnejadf7f4ae29f2d1
diff --git a/app/components/work_packages/date_picker/date_form_component.html.erb b/app/components/work_packages/date_picker/date_form_component.html.erb
index 53acbcf9dc9..d544079f8fc 100644
--- a/app/components/work_packages/date_picker/date_form_component.html.erb
+++ b/app/components/work_packages/date_picker/date_form_component.html.erb
@@ -18,7 +18,7 @@
end
start_date.with_row(classes: "wp-datepicker-dialog-date-form--text-field-container") do
- render(Primer::Alpha::TextField.new(**text_field_options(name: :start_date, label: start_date_label), aria: { live: :polite }))
+ render(Primer::Alpha::TextField.new(**text_field_options(name: :start_date, label: start_date_label)))
end
start_date.with_row(classes: "wp-datepicker-dialog-set-today-link") do
render_today_link(name: :start_date)
@@ -45,7 +45,7 @@
end
due_date.with_row(classes: "wp-datepicker-dialog-date-form--text-field-container") do
- render(Primer::Alpha::TextField.new(**text_field_options(name: :due_date, label: I18n.t("attributes.due_date")), aria: { live: :polite }))
+ render(Primer::Alpha::TextField.new(**text_field_options(name: :due_date, label: I18n.t("attributes.due_date"))))
end
due_date.with_row(classes: "wp-datepicker-dialog-set-today-link") do
render_today_link(name: :due_date)
@@ -54,7 +54,7 @@
end
body.with_column(classes: "wp-datepicker-dialog-date-form--duration") do
- render(Primer::Alpha::TextField.new(**text_field_options(name: :duration, label: WorkPackage.human_attribute_name("duration")), aria: { live: :polite }))
+ render(Primer::Alpha::TextField.new(**text_field_options(name: :duration, label: WorkPackage.human_attribute_name("duration"))))
end
end
end
diff --git a/app/components/work_packages/date_picker/date_form_component.rb b/app/components/work_packages/date_picker/date_form_component.rb
index bde178bfc9d..3eba3d01a60 100644
--- a/app/components/work_packages/date_picker/date_form_component.rb
+++ b/app/components/work_packages/date_picker/date_form_component.rb
@@ -211,7 +211,10 @@ module WorkPackages
data[:focus] = "true"
end
- { data: }
+ {
+ data: data,
+ aria: { live: :polite, atomic: true }
+ }
end
def single_date_field_button_link(focused_field)