Skip to content

Conversation

@AlexJacksonDS
Copy link
Contributor

@AlexJacksonDS AlexJacksonDS commented May 6, 2022

JIRA link

https://softwiretech.atlassian.net/browse/HEEDLS-871

Description

Fixed some bugs with sort and filter and some screen reader issues. Added category and topic tags.

Screenshots

image


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme. Links (if any) are below:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@DanBloxham-sw DanBloxham-sw 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, couple of minor points.

Also I'm not sure Kevin's response gives a clear answer as to which filters we want to display, might be worth following up on that.

return minutes < 60 ? $"{minutes}m" : $"{minutes / 60}h {minutes % 60}m";
}

public static string GetTimeStringForScreenReaderFromMinutes(int minutes)
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 fancy any unit tests for this?

Comment on lines +40 to +42
<table>
<tr class="header-row nhsuk-u-font-weight-bold">
<th class="value header-row-content">Section</th>
Copy link
Contributor

Choose a reason for hiding this comment

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

The NHS tables have specific roles for different table elements. Do we want them here?
https://service-manual.nhs.uk/design-system/components/table

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't believe we need them since we are using the correct html elements, looking at the various bits of documentation on them e.g. https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/row_role.
e.g. I probably should have had them for the table structure with divs that I had before.


public static string GetTimeStringForScreenReaderFromMinutes(int minutes)
{
return minutes < 60 ? $"{minutes} minutes" : $"{minutes / 60} hours {minutes % 60} minutes";
Copy link
Contributor

Choose a reason for hiding this comment

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

Just double checking, I'm guessing we are fine with "1 hour 0 minutes" rather than going for just "1 hour" whenever we have a whole number of hours? Same sort of question would apply to the tag content of "1h 0m".

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it's fine where we have data down to the minute. Also the old site displays these as 1h 0m, and it's been to show and tell.

Copy link
Contributor

@GeorgeBlackwell GeorgeBlackwell left a comment

Choose a reason for hiding this comment

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

Nice work, looks like Dan covered it

@AlexJacksonDS AlexJacksonDS merged commit 8dfd8d7 into master May 12, 2022
@AlexJacksonDS AlexJacksonDS deleted the HEEDLS-871-Learning_Content_Brand_Courses_Section branch May 12, 2022 14:12
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