Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

♿ [#2346] Remove spans, correct list-items #1172

Merged
merged 3 commits into from
Apr 26, 2024

Conversation

jiromaykin
Copy link
Contributor

@jiromaykin jiromaykin commented Apr 22, 2024

issue: https://taiga.maykinmedia.nl/project/open-inwoner/task/2346

Turns out there were faulty Spans around LI's inside UL's in some Cards pages + also wrong use of paragraph tags in case of empty list-items. Also: Headings should not be a direct child inside UL's.

@codecov-commenter
Copy link

codecov-commenter commented Apr 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.16%. Comparing base (aa07970) to head (46a0e94).
Report is 15 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1172      +/-   ##
===========================================
+ Coverage    95.13%   95.16%   +0.02%     
===========================================
  Files          957      955       -2     
  Lines        34645    34564      -81     
===========================================
- Hits         32960    32893      -67     
+ Misses        1685     1671      -14     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jiromaykin jiromaykin force-pushed the issue/2346-1.3.1-spans-unordered-lists branch from cd8ce30 to 3399091 Compare April 23, 2024 10:46
@jiromaykin jiromaykin marked this pull request as ready for review April 23, 2024 10:47
@jiromaykin jiromaykin marked this pull request as draft April 23, 2024 12:05
@jiromaykin jiromaykin force-pushed the issue/2346-1.3.1-spans-unordered-lists branch from c7a5298 to c6077f4 Compare April 23, 2024 12:40
@jiromaykin jiromaykin force-pushed the issue/2346-1.3.1-spans-unordered-lists branch from c58db10 to 1216031 Compare April 23, 2024 12:58
@jiromaykin jiromaykin marked this pull request as ready for review April 23, 2024 14:49
@jiromaykin
Copy link
Contributor Author

Adding both @stevenbal and @pi-sigma as reviewers since you've worked with these pages and can check to see if the stying is still the same after these changes, in for example "Mijn afspraken" etc.

Copy link
Contributor

@pi-sigma pi-sigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Minor questions about the use of aria-label.

Also, I noticed that the link for the Mijn begeleider card in the profile page behaves differently from the link for Mijn contacten in case the user has no contacts. The latter leads to /mijn-profiel/contacts/ (even if there aren't any contacts), while the latter leads to mijn-profiel/# (instead of /mijn-profiel/contacts?type=begeleider ). I think this should be made consistent.

I would prefer if both lead to the contacts page. It makes sense to direct to the contacts page even if the user doesn't have any existing contacts or mentors, because they can create new ones.

It's an easy fix, but could also be addressed in a separate PR.

{% if inbox_page_is_published %}
<span class="link link--icon link--secondary" aria-label="{% trans "Stuur een bericht" %}" title="{% trans "Stuur een bericht" %}">
{% if inbox_page_is_published %}
<span class="link link--icon link--secondary" aria-label="{% trans "Stuur een bericht" %}" title="{% trans "Stuur een bericht" %}">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need the aria-label here, since we have "Stuur een bericht" immediately below?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is actually an issue that will come up with the other thirty accessibility tasks still to come, but I will correct it on the profiel page here anyway.
Important to note: aria-label does not work on static elements such as div or span; it is meant for interactive elements that need a label, like buttons.
(The OIP project is quite cluttered with them...).

@jiromaykin
Copy link
Contributor Author

...noticed that the link for the Mijn begeleider card in the profile page behaves differently from the link for Mijn contacten in case the user has no contacts. ...
I would prefer if both lead to the contacts page. It makes sense to direct to the contacts page even if the user doesn't have any existing contacts or mentors, because they can create new ones.

@pi-sigma That issue is outside of the scope of accessibility so I put it in Taiga here: https://taiga.maykinmedia.nl/project/open-inwoner/issue/2408

@jiromaykin jiromaykin requested a review from pi-sigma April 25, 2024 11:39
Copy link
Contributor

@stevenbal stevenbal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just two comments about removed assertions, other than that it looks good 👍

@@ -1257,25 +1257,23 @@ def test_render_list_if_appointments_are_found(self, m):

passport_appointment = PQ(cards[0]).find("ul").children()

self.assertEqual(passport_appointment[0].text, "Aanvraag paspoort")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to keep this assertion if possible

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertEqual(PQ(cards[0]).find(".card__heading-2").text(), "Aanvraag paspoort")

self.assertEqual(
PQ(cards[0]).find("a").attr("href"),
f"{self.data.config.booking_base_url}{self.data.appointment_passport.publicId}",
)

id_card_appointment = PQ(cards[1]).find("ul").children()

self.assertEqual(id_card_appointment[0].text, "Aanvraag ID kaart")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as above

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.assertEqual(PQ(cards[1]).find(".card__heading-2").text(), "Aanvraag ID kaart")

@jiromaykin jiromaykin requested a review from stevenbal April 25, 2024 15:44
@stevenbal stevenbal merged commit 1e0422a into develop Apr 26, 2024
15 checks passed
@stevenbal stevenbal deleted the issue/2346-1.3.1-spans-unordered-lists branch April 26, 2024 07:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants