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

Remove title attribute on i tag

Christophe Bliard5d52fc0e9707
diff --git a/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb b/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
index cdcac312464..75251da3bcc 100644
--- a/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
+++ b/lib_static/plugins/acts_as_journalized/lib/journal_formatter/base.rb
@@ -67,9 +67,9 @@ module JournalFormatter
def format_html_details(label, old_value, value)
label = content_tag('strong', label)
- old_value = content_tag('i', h(old_value), title: h(old_value)) if old_value.present?
+ old_value = content_tag('i', h(old_value)) if old_value.present?
old_value = content_tag('strike', old_value) if old_value and value.blank?
- value = content_tag('i', h(value), title: h(value)) if value.present?
+ value = content_tag('i', h(value)) if value.present?
value ||= ''
[label, old_value, value]
diff --git a/spec/lib/journal_formatter/attachment_spec.rb b/spec/lib/journal_formatter/attachment_spec.rb
index 033b6b14ccf..e5b94aa8d77 100644
--- a/spec/lib/journal_formatter/attachment_spec.rb
+++ b/spec/lib/journal_formatter/attachment_spec.rb
@@ -84,7 +84,7 @@ describe OpenProject::JournalFormatter::Attachment do
let(:expected) do
I18n.t(:text_journal_deleted,
label: "<strong>#{I18n.t(:'activerecord.models.attachment')}</strong>",
- old: "<strike><i title=\"#{attachment.id}\">#{attachment.id}</i></strike>")
+ old: "<strike><i>#{attachment.id}</i></strike>")
end
it { expect(instance.render(key, [attachment.id.to_s, nil])).to eq(expected) }
diff --git a/spec/lib/journal_formatter/custom_field_spec.rb b/spec/lib/journal_formatter/custom_field_spec.rb
index 38b578f5b19..dadf7711c53 100644
--- a/spec/lib/journal_formatter/custom_field_spec.rb
+++ b/spec/lib/journal_formatter/custom_field_spec.rb
@@ -88,7 +88,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>#{custom_field.name}</strong>",
- value: "<i title=\"#{formatted_value}\">#{formatted_value}</i>")
+ value: "<i>#{formatted_value}</i>")
end
it 'outputs both formatted names' do
@@ -104,7 +104,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>#{custom_field.name}</strong>",
- value: "<i title=\"#{formatted_value}\">#{formatted_value}</i>")
+ value: "<i>#{formatted_value}</i>")
end
it 'outputs the one visible formatted name' do
@@ -121,7 +121,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>#{custom_field.name}</strong>",
- value: "<i title=\"#{formatted_value}\">#{formatted_value}</i>")
+ value: "<i>#{formatted_value}</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -136,8 +136,8 @@ describe OpenProject::JournalFormatter::CustomField do
I18n.t(:text_journal_changed_html,
label: "<strong>#{custom_field.name}</strong>",
linebreak: '',
- old: "<i title=\"#{old_formatted_value}\">#{old_formatted_value}</i>",
- new: "<i title=\"#{new_formatted_value}\">#{new_formatted_value}</i>")
+ old: "<i>#{old_formatted_value}</i>",
+ new: "<i>#{new_formatted_value}</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -150,7 +150,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_deleted,
label: "<strong>#{custom_field.name}</strong>",
- old: "<strike><i title=\"#{formatted_value}\">#{formatted_value}</i></strike>")
+ old: "<strike><i>#{formatted_value}</i></strike>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -205,7 +205,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>#{I18n.t(:label_deleted_custom_field)}</strong>",
- value: "<i title=\"#{values.last}\">#{values.last}</i>")
+ value: "<i>#{values.last}</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -220,8 +220,8 @@ describe OpenProject::JournalFormatter::CustomField do
I18n.t(:text_journal_changed_html,
label: "<strong>#{I18n.t(:label_deleted_custom_field)}</strong>",
linebreak: '',
- old: "<i title=\"#{values.first}\">#{values.first}</i>",
- new: "<i title=\"#{values.last}\">#{values.last}</i>")
+ old: "<i>#{values.first}</i>",
+ new: "<i>#{values.last}</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -235,7 +235,7 @@ describe OpenProject::JournalFormatter::CustomField do
let(:expected) do
I18n.t(:text_journal_deleted,
label: "<strong>#{I18n.t(:label_deleted_custom_field)}</strong>",
- old: "<strike><i title=\"#{values.first}\">#{values.first}</i></strike>")
+ old: "<strike><i>#{values.first}</i></strike>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -298,8 +298,8 @@ describe OpenProject::JournalFormatter::CustomField do
I18n.t(:text_journal_changed_html,
label: "<strong>#{custom_field.name}</strong>",
linebreak: '',
- old: "<i title=\"cf 1, cf 2\">cf 1, cf 2</i>",
- new: "<i title=\"cf 3, cf 4\">cf 3, cf 4</i>")
+ old: "<i>cf 1, cf 2</i>",
+ new: "<i>cf 3, cf 4</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
@@ -313,8 +313,8 @@ describe OpenProject::JournalFormatter::CustomField do
I18n.t(:text_journal_changed_html,
label: "<strong>#{custom_field.name}</strong>",
linebreak: '',
- old: "<i title=\"cf 1, cf 2\">cf 1, cf 2</i>",
- new: "<i title=\"(deleted option), cf 4\">(deleted option), cf 4</i>")
+ old: "<i>cf 1, cf 2</i>",
+ new: "<i>(deleted option), cf 4</i>")
end
it { expect(instance.render(key, values)).to eq(expected) }
diff --git a/spec/lib/journal_formatter/day_count_spec.rb b/spec/lib/journal_formatter/day_count_spec.rb
index 192b22377a7..1955f9b0a38 100644
--- a/spec/lib/journal_formatter/day_count_spec.rb
+++ b/spec/lib/journal_formatter/day_count_spec.rb
@@ -42,8 +42,8 @@ describe JournalFormatter::DayCount do
let(:expected) do
I18n.t(:text_journal_changed_html,
label: "<strong>Duration</strong>",
- old: '<i title="1 day">1 day</i>',
- new: '<i title="3 days">3 days</i>',
+ old: '<i>1 day</i>',
+ new: '<i>3 days</i>',
linebreak: '')
end
@@ -54,7 +54,7 @@ describe JournalFormatter::DayCount do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>Duration</strong>",
- value: '<i title="3 days">3 days</i>')
+ value: '<i>3 days</i>')
end
it { expect(instance.render(key, [nil, 3])).to eq(expected) }
@@ -64,7 +64,7 @@ describe JournalFormatter::DayCount do
let(:expected) do
I18n.t(:text_journal_deleted,
label: "<strong>Duration</strong>",
- old: '<strike><i title="3 days">3 days</i></strike>')
+ old: '<strike><i>3 days</i></strike>')
end
it { expect(instance.render(key, [3, nil])).to eq(expected) }
diff --git a/spec/lib/journal_formatter/ignore_non_working_days_spec.rb b/spec/lib/journal_formatter/ignore_non_working_days_spec.rb
index fa840bd0506..9f9605f8e6a 100644
--- a/spec/lib/journal_formatter/ignore_non_working_days_spec.rb
+++ b/spec/lib/journal_formatter/ignore_non_working_days_spec.rb
@@ -42,7 +42,7 @@ describe OpenProject::JournalFormatter::IgnoreNonWorkingDays do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>Working days</strong>",
- value: "<i title=\"include non-working days\">include non-working days</i>")
+ value: "<i>include non-working days</i>")
end
it { expect(instance.render(key, [false, true])).to eq(expected) }
@@ -52,7 +52,7 @@ describe OpenProject::JournalFormatter::IgnoreNonWorkingDays do
let(:expected) do
I18n.t(:text_journal_set_to,
label: "<strong>Working days</strong>",
- value: "<i title=\"working days only\">working days only</i>")
+ value: "<i>working days only</i>")
end
it { expect(instance.render(key, [true, false])).to eq(expected) }
diff --git a/spec/models/journal/project_journal_spec.rb b/spec/models/journal/project_journal_spec.rb
index ee3e05d9bd2..9028fcaca82 100644
--- a/spec/models/journal/project_journal_spec.rb
+++ b/spec/models/journal/project_journal_spec.rb
@@ -36,14 +36,14 @@ RSpec.describe Journal::ProjectJournal do
it 'renders identifier field correctly' do
html = journal.render_detail(['identifier', [nil, 'my-project']], html: true)
expect(html).to eq('<strong>Identifier</strong> set to ' \
- '<i title="my-project">my-project</i>')
+ '<i>my-project</i>')
html = journal.render_detail(['identifier', [nil, 'my-project']], html: false)
expect(html).to eq('Identifier set to my-project')
html = journal.render_detail(['identifier', ['my-project', 'my-beautiful-project']], html: true)
- expect(html).to eq('<strong>Identifier</strong> changed from <i title="my-project">my-project</i> ' \
- '<strong>to</strong> <i title="my-beautiful-project">my-beautiful-project</i>')
+ expect(html).to eq('<strong>Identifier</strong> changed from <i>my-project</i> ' \
+ '<strong>to</strong> <i>my-beautiful-project</i>')
html = journal.render_detail(['identifier', ['my-project', 'my-beautiful-project']], html: false)
expect(html).to eq('Identifier changed from my-project to my-beautiful-project')
@@ -52,14 +52,14 @@ RSpec.describe Journal::ProjectJournal do
it 'renders name field correctly' do
html = journal.render_detail(['name', [nil, 'Test Project 123']], html: true)
expect(html).to eq('<strong>Name</strong> set to ' \
- '<i title="Test Project 123">Test Project 123</i>')
+ '<i>Test Project 123</i>')
html = journal.render_detail(['name', [nil, 'Test Project 123']], html: false)
expect(html).to eq('Name set to Test Project 123')
html = journal.render_detail(['name', ['Old Project Name', 'New Project Name']], html: true)
- expect(html).to eq('<strong>Name</strong> changed from <i title="Old Project Name">Old Project Name</i> ' \
- '<strong>to</strong> <i title="New Project Name">New Project Name</i>')
+ expect(html).to eq('<strong>Name</strong> changed from <i>Old Project Name</i> ' \
+ '<strong>to</strong> <i>New Project Name</i>')
html = journal.render_detail(['name', ['Old Project Name', 'New Project Name']], html: false)
expect(html).to eq('Name changed from Old Project Name to New Project Name')