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
[60904] Accessibility for new datepicker (#18492)
Behrokh Satarnejad3f8b73cec0be
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.erbindex 840224502c3..5eaa34764b2 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 @@endstart_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)))+ render(Primer::Alpha::TextField.new(**text_field_options(name: :start_date, label: start_date_label), aria: { live: :polite }))endstart_date.with_row(classes: "wp-datepicker-dialog-set-today-link") dorender_today_link(name: :start_date)@@ -45,7 +45,7 @@enddue_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"))))+ render(Primer::Alpha::TextField.new(**text_field_options(name: :due_date, label: I18n.t("attributes.due_date")), aria: { live: :polite }))enddue_date.with_row(classes: "wp-datepicker-dialog-set-today-link") dorender_today_link(name: :due_date)@@ -54,7 +54,7 @@endbody.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"))))+ render(Primer::Alpha::TextField.new(**text_field_options(name: :duration, label: WorkPackage.human_attribute_name("duration")), aria: { live: :polite }))endendenddiff --git a/spec/components/work_packages/date_picker/dialog_content_component_spec.rb b/spec/components/work_packages/date_picker/dialog_content_component_spec.rbindex 633b4fcea37..a7eb85e5ee7 100644--- a/spec/components/work_packages/date_picker/dialog_content_component_spec.rb+++ b/spec/components/work_packages/date_picker/dialog_content_component_spec.rb@@ -50,8 +50,9 @@ RSpec.describe WorkPackages::DatePicker::DialogContentComponent, type: :componenlet(:schedule_manually) { true }it "shows the date form" do- expect(dialog_content).to have_field(I18n.t("attributes.start_date"))- expect(dialog_content).to have_field(I18n.t("attributes.due_date"))+ expect(dialog_content).to have_field(I18n.t("attributes.start_date"), aria: { live: :polite })+ expect(dialog_content).to have_field(I18n.t("attributes.due_date"), aria: { live: :polite })+ expect(dialog_content).to have_field(WorkPackage.human_attribute_name("duration"), aria: { live: :polite })endit "has an enabled save button" do