Skip to content

Commit

Permalink
Remove redundant title attribute from text_field() component (#1679)
Browse files Browse the repository at this point in the history
* a11y(title): remove redundant title attribute from `text_field()` component

* chore: fix broken test

---------

Co-authored-by: Jumana B <[email protected]>
  • Loading branch information
andrewleith and jzbahrai authored Oct 3, 2023
1 parent 08f33a0 commit e39f7d7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/templates/components/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@
</ul>
{% else %}
{% if truncate %}
<div class="truncate-text" title="{{ text }}">{{text}}</div>
<div class="truncate-text">{{text}}</div>
{% else %}
<div class="do-not-truncate-text" title="{{ text }}">{{text}}</div>
<div class="do-not-truncate-text">{{text}}</div>
{% endif %}
{% endif %}
{% endcall %}
Expand Down
12 changes: 6 additions & 6 deletions tests/app/main/views/test_send.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,8 +648,8 @@ def test_upload_valid_csv_shows_preview_and_table(
for row_index, row in enumerate(
[
(
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="6502532223">6502532223</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="A">A</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">6502532223</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">A</div> </td>', # noqa: E501
(
'<td class="table-field-left-aligned"> '
'<div class="table-field-status-default"> '
Expand All @@ -661,8 +661,8 @@ def test_upload_valid_csv_shows_preview_and_table(
),
),
(
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="6502532224">6502532224</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="B">B</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">6502532224</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">B</div> </td>', # noqa: E501
(
'<td class="table-field-left-aligned"> '
'<div class="table-field-status-default"> '
Expand All @@ -674,8 +674,8 @@ def test_upload_valid_csv_shows_preview_and_table(
),
),
(
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="6502532225">6502532225</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text" title="C">C</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">6502532225</div> </td>', # noqa: E501
'<td class="table-field-left-aligned"> <div class="do-not-truncate-text">C</div> </td>', # noqa: E501
(
'<td class="table-field-left-aligned"> '
'<div class="table-field-status-default"> '
Expand Down

0 comments on commit e39f7d7

Please sign in to comment.